Skip to content

feat: T&T: Warning message in case of too many wrong zip code attempt… #20

feat: T&T: Warning message in case of too many wrong zip code attempt…

feat: T&T: Warning message in case of too many wrong zip code attempt… #20

Workflow file for this run

name: deploy
on:
push:
branches: ["main"]
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@v3
- uses: actions/setup-node@v3
with:
node-version: '10'
- name: npm install
run: npm ci
- name: Build
run: npx parcel build src/index.js --no-source-maps
- name: AWS - authentication
uses: aws-actions/configure-aws-credentials@v1
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"