Web Audio API: Enjoy the Silence #138
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
- name: Setup AWS | |
run: | | |
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID \ | |
&& aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY \ | |
&& aws configure set region eu-central-1 | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: Sync with S3 | |
run: aws s3 sync --endpoint=https://fra1.digitaloceanspaces.com s3://$S3_BUCKET_NAME _site | |
env: | |
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Upload artifacts | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: _site | |
- name: Deploy to S3 | |
run: aws s3 sync --endpoint=https://fra1.digitaloceanspaces.com _site s3://$S3_BUCKET_NAME | |
env: | |
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }} | |
deploy: | |
runs-on: ubuntu-22.04 | |
needs: build | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
steps: | |
- name: Deploy | |
uses: actions/deploy-pages@v4 |