fix: publish docs preview artifact from CI

Merged
MY
3d ago
+47-0

Documentation previews fail because successful PR CI runs never upload the alchemy-worker artifact required by the deployment action. Build the exact PR head in the credential-free build job and upload its static site with a minimal asset-serving Worker. Configure preview asset routing to match production.

Run 41182441264 contained no artifacts; the download in run 41182489899 failed before deployment. Existing runs cannot be repaired by rerunning only the preview: the PR must receive a fresh CI run containing this workflow.

Validation: bun run build, bun run typecheck, bun run check, and the preview Worker regression test.

Created with gpt-6.1-terra in Codex.


Summary by cubic

Fixes documentation PR previews failing after successful CI runs, which never uploaded the alchemy-worker artifact required by the deployment job.

The build task now checks out the exact PR head SHA and uploads the built site together with a minimal asset-serving Worker (.github/preview-worker.js), and preview asset routing now matches production's htmlHandling and notFoundHandling configuration. Existing broken previews can't be repaired by rerunning the preview alone; the PR needs a fresh CI run containing this change.