Skip to content

Update deploy.yml

Update deploy.yml #7

Workflow file for this run

name: Deploy to S3
on:
push:
branches:
- s3-integration
jobs:
deploy:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: '${{ secrets.AWS_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '${{ secrets.AWS_SECRET_ACCESS_KEY }}'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js 18
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install and build
run: |
yarn global add node-gyp
yarn install
yarn run build
env:
CI: false
- name: Deploy to S3
uses: reggionick/s3-deploy@v3
with:
folder: build
bucket: 'dex-51'
bucket-region: 'us-east-2'
delete-removed: true
no-cache: true
private: true
# Add this step if you want to invalidate CloudFront cache after each deploy.
# - name: Invalidate CloudFront Distribution
# run: |
# aws cloudfront create-invalidation --distribution-id https://d219h6gvglr9x6.cloudfront.net --paths "/*"
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}