Skip to content

Commit

Permalink
Update deploytoS3.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewEls authored Jun 1, 2024
1 parent d3e0746 commit 754d28e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/deploytoS3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
runs-on: ubuntu-latest

env:
NEXTJS_DIST: frontend/build
NEXTJS_DIST: Build
AWS_REGION: ${{secrets.AWS_REGION}}
S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
Expand Down Expand Up @@ -41,10 +41,12 @@
run: npm run build

- name: Copy files to the production website with the AWS CLI
working-directory: frontend
run: |
aws s3 sync --delete ${{ env.NEXTJS_DIST }} s3://${{ env.S3_BUCKET }}
- name: Copy files to the production website with the AWS CLI
working-directory: frontend
run: |
aws cloudfront create-invalidation \
--distribution-id ${{ env.CLOUDFRONT_DISTRIBUTION_ID }} \
Expand Down

0 comments on commit 754d28e

Please sign in to comment.