From e948e32cf04534f04487c5001c2896f9d8785f93 Mon Sep 17 00:00:00 2001 From: Romain Billard Date: Tue, 16 Jun 2026 10:41:24 +0200 Subject: [PATCH] fix: update S3 cache rule for index.html --- .github/workflows/test-build-and-deploy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-build-and-deploy.yml b/.github/workflows/test-build-and-deploy.yml index ddef1c7fb0b..9a00d1702c7 100644 --- a/.github/workflows/test-build-and-deploy.yml +++ b/.github/workflows/test-build-and-deploy.yml @@ -173,7 +173,10 @@ jobs: AWS_REGION=${{ secrets.aws-region }} AWS_ACCESS_KEY_ID=${{ secrets.aws-access-key-id }} AWS_SECRET_ACCESS_KEY=${{ secrets.aws-secret-access-key }} aws s3 cp ./dist/dist/apps/console/ s3://${{ secrets.s3-bucket-name }}/ --recursive --exclude "index.html" - name: Copy index.html to S3 last run: | - AWS_REGION=${{ secrets.aws-region }} AWS_ACCESS_KEY_ID=${{ secrets.aws-access-key-id }} AWS_SECRET_ACCESS_KEY=${{ secrets.aws-secret-access-key }} aws s3 cp ./dist/dist/apps/console/index.html s3://${{ secrets.s3-bucket-name }}/ + # index.html must never be cached: it references content-hashed assets by name, + # and a stale version after a new deployment causes "Importing a module script failed" + # in Safari (which applies heuristic caching when Cache-Control is absent). + AWS_REGION=${{ secrets.aws-region }} AWS_ACCESS_KEY_ID=${{ secrets.aws-access-key-id }} AWS_SECRET_ACCESS_KEY=${{ secrets.aws-secret-access-key }} aws s3 cp ./dist/dist/apps/console/index.html s3://${{ secrets.s3-bucket-name }}/ --cache-control "no-store" staging-smoke-test: name: Staging smoke test