Skip to content

Commit

Permalink
Invalidate cloudfront cache after updating S3 to avoid stale content …
Browse files Browse the repository at this point in the history
…from being served (#746)
  • Loading branch information
jayvaznewm authored Oct 11, 2024
1 parent 9047340 commit fbddf1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
- name: Deploy studio
run: aws --region ${{ secrets.AWS_REGION }} s3 sync ./dist/apps/studio s3://${{ secrets.AWS_STUDIO_BUCKET_STUDIO }} --no-progress --delete

- name: Invalidate Cloudfront Cache
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_STUDIO_DISTRIBUTION_STUDIO }} --paths '/*'

- name: Send update to slack
id: slack
uses: slackapi/[email protected]
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/aws-hosting-merge-deploy-newm-studio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
- name: Deploy to S3
run: aws --region ${{ secrets.AWS_REGION }} s3 sync ./dist/apps/studio s3://${{ secrets.AWS_STUDIO_BUCKET_GARAGE }} --no-progress --delete

- name: Invalidate Cloudfront Cache
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_STUDIO_DISTRIBUTION_GARAGE }} --paths '/*'

- name: Send update to slack
id: slack
uses: slackapi/[email protected]
Expand Down

0 comments on commit fbddf1a

Please sign in to comment.