From c99273d3fc35d3bd2fa4a63a2591eac6b2e696d2 Mon Sep 17 00:00:00 2001 From: Adam Moussa Date: Fri, 18 Sep 2026 16:09:58 -0400 Subject: [PATCH] fix(cd): run deploy scripts from the workflow SHA An old content ref has no upload/verify scripts. Copy those from github.workflow_sha so dispatch of a live SHA can finish. --- .github/workflows/deploy-web.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/deploy-web.yaml b/.github/workflows/deploy-web.yaml index 33e63955..943cad51 100644 --- a/.github/workflows/deploy-web.yaml +++ b/.github/workflows/deploy-web.yaml @@ -15,6 +15,10 @@ name: Deploy Web # # Bucket and distribution come from SSM after assuming the Environment's # DEPLOY_ROLE_ARN. Nothing here creates an HCP run. Quality gates live in CI. +# +# The SPA checkout is the resolved content ref. Deploy scripts are copied +# from github.workflow_sha so workflow_dispatch of an older SHA still runs +# the current upload/verify path. on: push: @@ -131,6 +135,27 @@ jobs: echo "sha=${sha}" >> "${GITHUB_OUTPUT}" echo "Building ${sha}" + - name: Checkout workflow deploy scripts + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ github.workflow_sha }} + persist-credentials: false + sparse-checkout: | + scripts + sparse-checkout-cone-mode: true + path: .workflow-scripts + + - name: Install workflow deploy scripts + run: | + set -euo pipefail + test -f .workflow-scripts/scripts/upload-sourcemaps.sh + test -f .workflow-scripts/scripts/verify-cloudfront-release.sh + test -f .workflow-scripts/scripts/summarize-cloudfront-live-state.sh + mkdir -p scripts + cp .workflow-scripts/scripts/upload-sourcemaps.sh scripts/ + cp .workflow-scripts/scripts/verify-cloudfront-release.sh scripts/ + cp .workflow-scripts/scripts/summarize-cloudfront-live-state.sh scripts/ + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: node-version: "24"