Skip to content

Commit ade938f

Browse files
authored
Add CloudFront cache invalidation step
Add a step to invalidate CloudFront cache after deployment to aid dev process.
1 parent 57fc28b commit ade938f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎.github/workflows/test_xml_html.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,15 @@ jobs:
150150
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
151151
AWS_REGION: ${{ secrets.AWS_REGION }}
152152

153+
- name: Invalidate CloudFront Cache
154+
run: |
155+
aws cloudfront create-invalidation \
156+
--distribution-id ${{ secrets.GADDEL_CLOUDFRONT_DISTRIBUTION_ID}} \
157+
--paths "/*"
158+
env:
159+
AWS_REGION: ${{ secrets.AWS_REGION }}
160+
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
161+
153162

154163
# Step 9: Upload error logs as an artifact for debugging
155164
- name: Upload Logs to GitHub Artifacts

0 commit comments

Comments
 (0)