diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bd20a98e5a..bfa9b7770c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -113,6 +113,13 @@ jobs: AWS_REGION: us-east-1 # cloudfront and lambda edge functions are only available in us-east-1 region AWS_CLOUDFRONT_ID: ${{ env.DOCS_CLOUDFRONT_ID }} AWS_LAMBDA_FUNCTION: ${{ env.DOCS_LAMBDA_FUNCTION_REDIRECTS }} + - + name: Invalidate Cloudfront cache + if: ${{ env.DOCS_CLOUDFRONT_ID != '' }} + run: | + aws cloudfront create-invalidation --distribution-id ${{ env.DOCS_CLOUDFRONT_ID }} --paths "/*" + env: + AWS_REGION: us-east-1 # cloudfront is only available in us-east-1 region - name: Send Slack notification if: ${{ env.SEND_SLACK_MSG == 'true' }}