File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change 2020 TARGET : ${{ inputs.environment || 'staging' }}
2121 ACCT : ${{ inputs.environment == 'production' && '990880627107' || '327995277200' }}
2222 BUCKET : ${{ inputs.environment == 'production' && 'tiny-cloud-antora-docs-release' || 'tiny-cloud-antora-docs-preview' }}
23- DISTRIBUTION : ${{ inputs.environment == 'production' && 'E3LFU502SQ5UR' || 'E7DUUPEI08HNW'}}
2423 RUN : run-${{ github.run_number }}-${{ github.run_attempt }}
2524
2625jobs :
6665 role-session-name : tinymce-docs-${{ env.TARGET }}-release
6766 aws-region : us-east-1
6867
69- - name : Upload website preview to S3
68+ - name : Upload website to S3
7069 run : |
71- aws s3 sync ./build s3://${BUCKET}/main/${RUN}
70+ aws s3 sync ./build s3://${BUCKET}/main/${RUN} \
71+ --exclude "index.html" \
72+ --cache-control "public, max-age=3600, stale-while-revalidate=86400"
73+ aws s3 sync ./build s3://${BUCKET}/main/${RUN} \
74+ --exclude "*" \
75+ --include "index.html" \
76+ --cache-control "max-age=300, stale-while-revalidate=86400"
7277
7378 - name : Create redirects on S3
74798994 bucket : ${{ env.BUCKET }}
9095 folder : main
9196 parallel : 20
92-
93- - name : Invalidate Cloudfront Cache
94- # sleep to wait for envoy's version pointer caching to expire
95- run : |
96- sleep 30s
97- aws cloudfront create-invalidation --distribution-id ${{ env.DISTRIBUTION }} --paths "/docs/*"
You can’t perform that action at this time.
0 commit comments