Skip to content

fix(ci): stop deploy.yml failing on every push, dry-run deploy mechanics (Phase 14) - #24

Merged
withrvr merged 1 commit into
masterfrom
phase-14-cicd-dry-run
Sep 14, 2026
Merged

withrvr merged 1 commit into
masterfrom
phase-14-cicd-dry-run

Conversation

@withrvr

@withrvr withrvr commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Real bug found: .github/workflows/deploy.yml (FastAPI Cloud) triggers on push: branches: [master], invisible to gh pr checks (only shows PR status checks, not post-merge push-triggered workflows). It has failed on every single push to master since this repo's first one. Root cause: bun run --filter frontend build -- the workspace package has been botpit-frontend since the Phase 9.5 rebrand, not frontend.
  • Fixed the bug; changed the trigger to workflow_dispatch only, matching deploy-docker-compose.yml's own already-correct pattern -- no FASTAPI_CLOUD_TOKEN exists yet (DECISIONS.md §1: no server bought until local dev is complete), so even fixed it would still correctly fail at the final deploy step. No point auto-firing and failing on every merge for a deploy nobody's asking it to attempt.
  • Actually dry-ran the deploy mechanics (DECISIONS.md §1: "deploy workflows are written and dry-run locally"), not just read the YAML: compose.yml+compose.deploy.yml's config/build clean; the "prepare database" step run directly against a fresh throwaway Postgres under FASTAPI_ENV=production with real secrets -- full migration chain applies cleanly, superuser seeds correctly, and Settings correctly refuses dev-placeholder secrets outside development (confirmed the guard works, not routed around).
  • Adapted two template-org leftovers explicitly named as deferred-to-Phase-14 in Phase 9.7's own doc (docs/development/ci-cd-and-docker.md): deploy*.yml's and zizmor.yml's always-constant github.repository/repository_owner conditionals, replaced with what they always evaluate to for this repo.
  • Checked (not assumed) the other org-gated workflows (issue-manager, bump-pre-commit-hooks, add-to-project) via run history -- correctly inert (skipped, never failed), left alone per Phase 9.5/9.6 precedent.
  • Fixed a stale DECISIONS.md cross-reference to docs/deployment.md (never existed) -- the real, already-thorough doc is docs/deployment/.

No application code or tests changed -- CI workflow YAML and docs only.

Test plan

  • prek run --all-files clean, including zizmor (GH Actions security linter) against every edited workflow
  • docker compose -f compose.yml -f compose.deploy.yml config/build verified locally
  • Deploy mechanics' migrate+seed step verified against a real throwaway Postgres under production-mode settings

Claude-Session: https://claude.ai/code/session_01UbiPa1rKCyqhqufgwJWkeW

…chanics (Phase 14)

deploy.yml (FastAPI Cloud) has failed on every single push to master
since this repo's first one -- invisible to gh pr checks because a
push-triggered workflow never appears there. Root cause: `bun run
--filter frontend build`, but the workspace package has been
`botpit-frontend` since the Phase 9.5 rebrand. Fixed the bug and changed
the trigger to workflow_dispatch (no FASTAPI_CLOUD_TOKEN exists yet --
DECISIONS.md §1, no server), matching deploy-docker-compose.yml's own
already-correct pattern.

Dry-ran the compose-based deploy mechanics for real: config+build clean,
and the prepare-database step against a fresh throwaway Postgres under
FASTAPI_ENV=production with real secrets -- full migration chain applies
cleanly, superuser seeds correctly, Settings correctly refuses
dev-placeholder secrets outside development.

Also adapted two template-org leftovers explicitly deferred to this
phase in Phase 9.7's own write-up (deploy*.yml's/zizmor.yml's
always-constant github.repository[_owner] conditionals), and fixed a
stale DECISIONS.md cross-reference to a deployment doc that never
existed at that path.

Claude-Session: https://claude.ai/code/session_01UbiPa1rKCyqhqufgwJWkeW
@withrvr
withrvr merged commit 73e9fe7 into master Sep 14, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant