From f07a8f279c0223bc8e0832cff7047935133777fa Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Fri, 19 Jun 2026 08:37:09 +0200 Subject: [PATCH] Reduce redundant CloudFront invalidation paths --- .github/workflows/build_master.yml | 4 +++- .github/workflows/translate_all.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_master.yml b/.github/workflows/build_master.yml index fdccb007edf..c27e75744fd 100644 --- a/.github/workflows/build_master.yml +++ b/.github/workflows/build_master.yml @@ -202,7 +202,9 @@ jobs: - name: Invalidate CloudFront HTML and SEO assets run: | + # /en/* covers /en/robots.txt and /en/sitemap.xml; only invalidate + # root SEO files separately. aws cloudfront create-invalidation \ --distribution-id "${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}" \ - --paths "/en/*" "/robots.txt" "/en/robots.txt" "/sitemap.xml" "/en/sitemap.xml" + --paths "/en/*" "/robots.txt" "/sitemap.xml" diff --git a/.github/workflows/translate_all.yml b/.github/workflows/translate_all.yml index b8b67c67ec7..1205ae7ce79 100644 --- a/.github/workflows/translate_all.yml +++ b/.github/workflows/translate_all.yml @@ -290,7 +290,9 @@ jobs: shell: bash run: | set -euo pipefail - paths=("/$BRANCH/*" "/$BRANCH/sitemap.xml") + # The wildcard already invalidates the language sitemap, so avoid + # paying for a redundant explicit /$BRANCH/sitemap.xml path. + paths=("/$BRANCH/*") if [ "${{ steps.root_sitemap.outputs.changed }}" = "true" ]; then paths+=("/sitemap.xml") fi