chore: update deps #25
This file contains hidden or 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: Build and Deploy to CloudFront | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build-and-deploy: | |
name: Build and Deploy | |
runs-on: ubuntu-latest | |
env: | |
BUCKET: webgl-speaker-configurator.d1a.app | |
DIST: dist | |
REGION: eu-central-1 | |
DIST_ID: E2RBEFRMK7BND2 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{secrets.AWS_ACCESS_KEY_ID}} | |
aws-secret-access-key: ${{secrets.AWS_SECRET_ACCESS_KEY}} | |
aws-region: ${{env.REGION}} | |
- name: Install PNPM | |
run: npm install --global pnpm | |
- name: Install Deps | |
run: pnpm install | |
- name: Build static files | |
run: pnpm build | |
- name: Clear old files | |
run: | | |
aws s3 sync --delete ${{env.DIST}} s3://${{env.BUCKET}} | |
- name: Copy files to production | |
run: | | |
aws cloudfront create-invalidation \ | |
--distribution-id ${{env.DIST_ID}} \ | |
--paths "/*" |