Skip to content

Commit 6c3721d

Browse files
committed
TCLOUD-4860: Add cloudfront invalidation step
1 parent 736a331 commit 6c3721d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/deploy_docs_v2.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ env:
2121
TARGET: ${{ inputs.environment || 'staging' }}
2222
ACCT: ${{ inputs.environment == 'production' && '990880627107' || '327995277200' }}
2323
BUCKET: ${{ inputs.environment == 'production' && 'tiny-cloud-antora-docs-release' || 'tiny-cloud-antora-docs-preview' }}
24+
DISTRIBUTION: ${{ inputs.environment == 'production' && 'E3LFU502SQ5UR' || 'E7DUUPEI08HNW'}}
2425
RUN: run-${{ github.run_number }}-${{ github.run_attempt }}
2526

2627
jobs:
@@ -88,4 +89,12 @@ jobs:
8889
with:
8990
bucket: ${{ env.BUCKET }}
9091
folder: main
91-
parallel: 20
92+
parallel: 20
93+
94+
- name: Invalidate Cloudfront Cache
95+
# sleep to wait for envoy's version pointer caching to expire
96+
run: |
97+
sleep 30s
98+
aws cloudfront create-invalidation --distribution-id ${{ env.DISTRIBUTION }} --paths "/docs/*"
99+
env:
100+
AWS_EC2_METADATA_DISABLED: true

0 commit comments

Comments
 (0)