offload off view port images (#45) #42
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: Deploy | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: Del Dep | |
run: rm -rf node_modules package-lock.json && npm cache clean –force | |
- name: Set NPM Version | |
run: npm install -g npm@6 | |
- name: Install dependencies | |
run: npm i | |
- name: Build | |
run: npm run build | |
- name: Deploy | |
uses: reggionick/s3-deploy@v3 | |
with: | |
folder: build | |
bucket: ${{ secrets.S3_BUCKET }} | |
bucket-region: ${{ secrets.S3_BUCKET_REGION }} | |
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} | |
invalidation: / | |
delete-removed: true | |
no-cache: true |