From 437c8b36f9bc02ff31c94eeabe755b11136b4a5c Mon Sep 17 00:00:00 2001 From: Carlos Polop Date: Sun, 8 Nov 2026 12:15:44 +0100 Subject: [PATCH] Use exact promotion paths to avoid CloudFront wildcard quota --- .github/workflows/deploy_promotion.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy_promotion.yml b/.github/workflows/deploy_promotion.yml index d16f6af2cd..dd5b703e05 100644 --- a/.github/workflows/deploy_promotion.yml +++ b/.github/workflows/deploy_promotion.yml @@ -59,11 +59,10 @@ jobs: aws s3 cp theme/discount.css "s3://${BUCKET}/${prefix}${stylesheet}" \ --content-type text/css --cache-control 'public,max-age=300' --only-show-errors done - # CloudFront only expands a wildcard at the END of a path. - # Include query-string variants without clearing unrelated book assets. + # Exact paths avoid CloudFront's limit of 15 concurrent wildcard paths. invalidation_paths+=( - "/${prefix}theme/discount.js*" "/${prefix}discount.js*" - "/${prefix}theme/discount.css*" "/${prefix}discount.css*" + "/${prefix}theme/discount.js" "/${prefix}discount.js" + "/${prefix}theme/discount.css" "/${prefix}discount.css" ) done < /tmp/languages.txt invalidation_id=$(aws cloudfront create-invalidation \