chore: upgrade dev dependencies to fix 56+ Dependabot security alerts… #23
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: deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| deployment: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| id-token: write | |
| env: | |
| GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| - name: npm install | |
| run: npm ci | |
| - name: Build | |
| run: npx parcel build --target deploy | |
| - name: AWS - authentication | |
| uses: aws-actions/configure-aws-credentials@v5.1.0 | |
| with: | |
| aws-region: 'eu-central-1' | |
| role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | |
| - name: Upload files for V2 (AWS S3) | |
| run: | | |
| aws s3 cp \ | |
| --cache-control max-age=86400 \ | |
| ./dist/index.css s3://parcellab-cdn/css/v2/parcelLab.min.css | |
| aws s3 cp \ | |
| --cache-control max-age=86400 \ | |
| ./dist/index.js s3://parcellab-cdn/js/v2/parcelLab.min.js | |
| - name: Upload files for V3 (AWS S3) | |
| run: | | |
| aws s3 cp \ | |
| --cache-control max-age=86400 \ | |
| ./dist/index.css s3://parcellab-cdn/css/v3/parcelLab.min.css | |
| aws s3 cp \ | |
| --cache-control max-age=86400 \ | |
| ./dist/index.js s3://parcellab-cdn/js/v3/parcelLab.min.js | |
| - name: Clear the CDN cache (CloudFront) | |
| run: | | |
| aws cloudfront create-invalidation \ | |
| --distribution-id E3R5S2BJQI4RDS \ | |
| --paths \ | |
| "/css/v2/parcelLab.min.css" \ | |
| "/js/v2/parcelLab.min.js" \ | |
| "/css/v3/parcelLab.min.css" \ | |
| "/js/v3/parcelLab.min.js" |