File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,7 +178,9 @@ jobs:
178178
179179 - name : Invalidate CloudFront HTML and SEO assets
180180 run : |
181+ # /en/* covers /en/robots.txt and /en/sitemap.xml; only invalidate
182+ # root SEO files separately.
181183 aws cloudfront create-invalidation \
182184 --distribution-id "${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}" \
183- --paths "/en/*" "/robots.txt" "/en/robots.txt" "/sitemap.xml" "/en/ sitemap.xml"
185+ --paths "/en/*" "/robots.txt" "/sitemap.xml"
184186
Original file line number Diff line number Diff line change @@ -296,7 +296,9 @@ jobs:
296296 shell : bash
297297 run : |
298298 set -euo pipefail
299- paths=("/$BRANCH/*" "/$BRANCH/sitemap.xml")
299+ # The wildcard already invalidates the language sitemap, so avoid
300+ # paying for a redundant explicit /$BRANCH/sitemap.xml path.
301+ paths=("/$BRANCH/*")
300302 if [ "${{ steps.root_sitemap.outputs.changed }}" = "true" ]; then
301303 paths+=("/sitemap.xml")
302304 fi
You can’t perform that action at this time.
0 commit comments