From 54778a208d1758bd26faa0d3474da3d75d41d248 Mon Sep 17 00:00:00 2001 From: Ryan Kelly <94ryan.kelly@gmail.com> Date: Sat, 1 Aug 2026 19:53:07 +0100 Subject: [PATCH 1/2] ci(web): add alias_preview dispatch input for preview-maze.ryankelly.dev Dispatching with alias_preview=true always deploys a preview (never prod) and pins it to preview-maze.ryankelly.dev, giving a stable URL for bisecting old commits against the WebGL text-rendering regression. Co-Authored-By: Claude Fable 5 --- .github/scripts/deploy-vercel.ps1 | 13 ++++++++++++- .github/workflows/web-export.yml | 6 ++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/scripts/deploy-vercel.ps1 b/.github/scripts/deploy-vercel.ps1 index da33985..bba8cd8 100644 --- a/.github/scripts/deploy-vercel.ps1 +++ b/.github/scripts/deploy-vercel.ps1 @@ -6,7 +6,7 @@ # docs/WEB_EXPORT.md. # # Inputs (environment): -# EVENT_NAME, GIT_REF, IN_TARGET (blank = preview), BUILD_COMMIT, VERCEL_TOKEN +# EVENT_NAME, GIT_REF, IN_TARGET (blank = preview), ALIAS_PREVIEW, BUILD_COMMIT, VERCEL_TOKEN Set-StrictMode -Version Latest $ErrorActionPreference = 'Stop' @@ -33,6 +33,17 @@ if ($target -eq 'production') { $url = (vercel deploy build/web --yes --token=$env:VERCEL_TOKEN) | Select-Object -Last 1 } +# ALIAS_PREVIEW=true pins this deploy to the stable bisect/inspection URL +# preview-maze.ryankelly.dev. Preview-only by design: production already has its own +# alias, and pinning a prod deploy here would silently repurpose the bisect URL. +if ($env:ALIAS_PREVIEW -eq 'true') { + if ($target -ne 'preview') { + throw "alias_preview=true is only valid with deploy_target=preview (got $target)." + } + vercel alias set $url preview-maze.ryankelly.dev --token=$env:VERCEL_TOKEN + Write-Host "DEPLOY_ALIAS=https://preview-maze.ryankelly.dev" +} + "url=$url" >> $env:GITHUB_OUTPUT "target=$target" >> $env:GITHUB_OUTPUT diff --git a/.github/workflows/web-export.yml b/.github/workflows/web-export.yml index 40114fc..2ae0bac 100644 --- a/.github/workflows/web-export.yml +++ b/.github/workflows/web-export.yml @@ -55,6 +55,11 @@ on: description: "Override export-template folder name (blank = .github/web-toolchain.env)" required: false default: "" + alias_preview: + description: "Alias this deploy to preview-maze.ryankelly.dev (for bisecting old commits without touching prod)" + type: boolean + required: false + default: false issue_comment: types: [created] @@ -106,6 +111,7 @@ jobs: EVENT_NAME: ${{ github.event_name }} GIT_REF: ${{ github.ref }} IN_TARGET: ${{ github.event.inputs.deploy_target }} + ALIAS_PREVIEW: ${{ github.event.inputs.alias_preview }} BUILD_COMMIT: ${{ steps.export.outputs.build_commit }} run: '& "$env:GITHUB_WORKSPACE/.github/scripts/deploy-vercel.ps1"' From a5471fa38f02cd68468861f145a96aa890fa78ae Mon Sep 17 00:00:00 2001 From: Ryan Kelly <94ryan.kelly@gmail.com> Date: Sat, 1 Aug 2026 21:12:30 +0100 Subject: [PATCH 2/2] ci(web): wire ALIAS_PREVIEW through both deploy-vercel.ps1 call sites The workflow-script guard requires every env var the script reads to be provided at each call site; the /preview job pins it to false so a PR preview can never commandeer the stable bisect alias. Co-Authored-By: Claude Fable 5 --- .github/workflows/web-export.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/web-export.yml b/.github/workflows/web-export.yml index 2ae0bac..0045acc 100644 --- a/.github/workflows/web-export.yml +++ b/.github/workflows/web-export.yml @@ -258,7 +258,10 @@ jobs: # Same script as the production job. IN_TARGET is pinned to preview rather than left # unset: a /preview must never be able to reach production, and stating it means the # script's behaviour does not depend on how PowerShell reads an absent env var. + # ALIAS_PREVIEW likewise: a /preview gets its own throwaway URL and must not + # commandeer the stable preview-maze.ryankelly.dev bisect alias. IN_TARGET: "preview" + ALIAS_PREVIEW: "false" EVENT_NAME: ${{ github.event_name }} GIT_REF: ${{ github.ref }} BUILD_COMMIT: ${{ steps.export.outputs.build_commit }}