File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -202,7 +202,9 @@ jobs:
202202
203203 - name : Invalidate CloudFront HTML and SEO assets
204204 run : |
205+ # /en/* covers /en/robots.txt and /en/sitemap.xml; only invalidate
206+ # root SEO files separately.
205207 aws cloudfront create-invalidation \
206208 --distribution-id "${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}" \
207- --paths "/en/*" "/robots.txt" "/en/robots.txt" "/sitemap.xml" "/en/ sitemap.xml"
209+ --paths "/en/*" "/robots.txt" "/sitemap.xml"
208210
Original file line number Diff line number Diff line change @@ -290,7 +290,9 @@ jobs:
290290 shell : bash
291291 run : |
292292 set -euo pipefail
293- paths=("/$BRANCH/*" "/$BRANCH/sitemap.xml")
293+ # The wildcard already invalidates the language sitemap, so avoid
294+ # paying for a redundant explicit /$BRANCH/sitemap.xml path.
295+ paths=("/$BRANCH/*")
294296 if [ "${{ steps.root_sitemap.outputs.changed }}" = "true" ]; then
295297 paths+=("/sitemap.xml")
296298 fi
You can’t perform that action at this time.
0 commit comments