diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4aa2a0ec2..aa0e2b784 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,6 +21,8 @@ on: workflow_run: workflows: ["CI"] # the job in ci.yml types: [completed] + branches: [main] # a PR's CI is not a ship signal — filter it out + # here rather than creating a run that only skips # Ships whatever is on main right now. Required, not a convenience: a CI run # that GITHUB_TOKEN started (the auto-merge re-arm) emits NO workflow_run # event, so the chain above never fires for an auto-merged PR — observed diff --git a/CLAUDE.md b/CLAUDE.md index ac593d1bc..75bec7ab0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -248,6 +248,20 @@ before changing anything here. - The CD re-arm at the end of the sweep is load-bearing: a push made with the default `GITHUB_TOKEN` does not trigger workflows, so without it merges land and silently never deploy. `ci.yml` carries `workflow_dispatch` for this. +- **The `GITHUB_TOKEN` no-cascade rule applies one level deeper than you + expect.** The re-armed CI run is *itself* `GITHUB_TOKEN`-created, so its + completion fires no `workflow_run` event either. Anything that listens for CI + therefore never wakes on an automated merge. Observed 2026-08-05: three PRs + merged onto a green `main` and zero Deploy runs were created — invisible, + because CI itself ran and went green. +- **Deployment is a reconciler, not a trigger.** Each sweep compares `main`'s tip + against the last successful Deploy and dispatches `deploy.yml` directly when + they differ, so a deploy that never fired *or* failed is retried next sweep + instead of sitting merged-but-not-live. Never add a workflow that only + triggers on `workflow_run` of CI and assume automated merges reach it — give + it `workflow_dispatch` and drive it from the sweep. +- **After merging, confirm the commit is LIVE, not just merged.** Green CI plus + a merge is not a deploy; check the running site. ## Dev Commands