From 233d35c0ff59fcb087a195c77382394c864abcd2 Mon Sep 17 00:00:00 2001 From: Sarthak Agrawal Date: Thu, 22 Oct 2026 18:18:15 +0530 Subject: [PATCH] docs: correct Reader automatic publication boundary --- AGENTS.md | 13 ++++++++----- docs/operations/ci-cd.md | 5 +++-- docs/operations/deploy.md | 18 ++++++++++++------ docs/operations/runbooks/rollback.md | 6 ++++-- 4 files changed, 27 insertions(+), 15 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 1d8cb0d..4786163 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -22,7 +22,7 @@ pnpm dev:worker # wrangler dev only pnpm dev:spa # vite only (proxies /api → 8787) pnpm build # validate env + vite build → dist/ pnpm cf:build # build + landing-astro + overlay into dist/ -pnpm deploy # validate env + cf:build + wrangler deploy (manual; CI does not auto-deploy) +pnpm deploy # explicit local publisher; main also publishes through Cloudflare Workers Builds pnpm typecheck # tsc --noEmit (app + worker tsconfigs) pnpm test # vitest run pnpm quality # complete local/CI code-health gate @@ -44,10 +44,13 @@ Full command map: [docs/development/commands.md](docs/development/commands.md). - **Do not commit secrets.** `.env`, `.env.local`, `.dev.vars`, `firebase-service-account.json`, and any auth credential are gitignored. Verify `.gitignore` before any push. -- **Do not deploy or run migrations without explicit user approval.** - Commit and push safe changes. -- **Production deploy is manual** (`workflow_dispatch` on - `.github/workflows/deploy.yml`). CI runs on push but does not deploy. +- Follow the owner's release authorization policy before publishing. Commit + and push safe changes; standing authorization applies within its scope. +- **Merging `main` publishes production through Cloudflare Workers Builds.** + PR builds upload preview versions. GitHub's `deploy.yml` is a separate manual + publisher (`workflow_dispatch`) that attaches the full commit SHA tag. + Check release authorization before merging; a green PR preview is not proof + of the active production version. See [deploy.md](docs/operations/deploy.md). - **The Worker name `reader` is load-bearing** — the custom domain (`read.significanthobbies.com`) and all Cloudflare secrets are bound to it. Do not rename without re-provisioning. diff --git a/docs/operations/ci-cd.md b/docs/operations/ci-cd.md index 4e3b023..61757d8 100644 --- a/docs/operations/ci-cd.md +++ b/docs/operations/ci-cd.md @@ -13,8 +13,9 @@ for triggers and steps; this page documents intent. unused code, complexity, duplication, cycles, dependency risk, suppressions, docs, production builds, and repository hygiene). -No deploy. No secrets beyond what `validate:env:build` needs (none for -`build` mode). +This GitHub workflow does not deploy. The separate Cloudflare Workers Builds +integration publishes `main` and uploads PR previews; see [deploy.md](deploy.md). +No secrets beyond what `validate:env:build` needs (none for `build` mode). ## Deploy — `.github/workflows/deploy.yml` diff --git a/docs/operations/deploy.md b/docs/operations/deploy.md index 3e9e03e..a0e6037 100644 --- a/docs/operations/deploy.md +++ b/docs/operations/deploy.md @@ -1,9 +1,15 @@ # Deploy Reader deploys to Cloudflare Workers as the `reader` Worker with a custom -domain `read.significanthobbies.com`. Production deploys are **manual** -(`workflow_dispatch` on `.github/workflows/deploy.yml`) — there is no -auto-deploy on push to `main` (CI runs on push, deploy does not). +domain `read.significanthobbies.com`. Cloudflare Workers Builds publishes +`main` automatically; a merge is a production release. Follow the owner's +release authorization policy before merging. PR builds upload preview +versions without changing the active production deployment. + +The GitHub `deploy.yml` workflow is a separate explicit publisher +(`workflow_dispatch`). It tags the uploaded version with the full commit SHA. +After either path, verify the active Worker version and traffic allocation, +then exercise the live flow. A successful build alone does not verify release. ## Pipeline @@ -68,9 +74,9 @@ A non-200 aborts the workflow. ## Preview deploys -`.github/workflows/deploy.yml` has a `deploy-preview` job that runs on PRs -(`pnpm cf:build` only, no deploy). It validates the build is green without -pushing to production. +Cloudflare Workers Builds uploads PR preview versions. The GitHub deploy +workflow also defines a build-only `deploy-preview` job, but its manual-only +trigger means that job does not currently run on PRs. See [ci-cd.md](ci-cd.md). ## Rollback diff --git a/docs/operations/runbooks/rollback.md b/docs/operations/runbooks/rollback.md index 49d9010..fca6518 100644 --- a/docs/operations/runbooks/rollback.md +++ b/docs/operations/runbooks/rollback.md @@ -1,8 +1,10 @@ # Runbook: Rollback a Deploy Cloudflare Workers does not keep old Worker versions indefinitely, so rollback -is "redeploy a known-good commit." The deploy is manual -(`workflow_dispatch`), so rollback is also manual. +can use a retained known-good version or redeploy a known-good commit. Capture +the active version before a release. Rollback is deliberate and manual through +the explicit publisher (`workflow_dispatch`); automatic publication of the next +`main` merge can supersede it. See [deploy.md](../deploy.md). ## Fast rollback (code)