Skip to content

Commit

Permalink
adds cloudfront invalidation to push
Browse files Browse the repository at this point in the history
  • Loading branch information
ajrothwell committed Jan 23, 2025
1 parent a6a6afd commit e4a8432
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/prod_push_to_s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,10 @@ jobs:
aws-region: us-east-1

- name: Deploy static site to S3 bucket
run: aws s3 sync dist s3://dpd-zoning-summary-generator-dev --delete
env:
AWS_S3_BUCKET: dpd-zoning-summary-generator-dev
AWS_CLOUDFRONT_DISTRIBUTION: E2K2DCUMZ188JW
run: |
aws s3 sync dist s3://$AWS_S3_BUCKET --delete
aws s3 cp s3://$AWS_S3_BUCKET s3://$AWS_S3_BUCKET --recursive --exclude "*" --include "*.html" --metadata-directive REPLACE --acl public-read --cache-control max-age=0,no-cache,no-store,must-revalidate,proxy-revalidate,public --expires "0" --content-type "text/html; charset=utf-8"
aws cloudfront create-invalidation --distribution-id $AWS_CLOUDFRONT_DISTRIBUTION --paths "/*"

0 comments on commit e4a8432

Please sign in to comment.