Files
sim/.github/workflows
Theodore LiandClaude Opus 4.8 dcc7c0c7c4 ci(dev): auto-deploy Trigger.dev tasks + fail dev db:push on TTY prompt (#5343)
* ci(trigger): auto-deploy Trigger.dev tasks to dev-sim on dev pushes

Add a deploy-trigger-dev job that runs `trigger.dev deploy --env preview
--branch dev-sim` on pushes to the dev branch, replacing the manual step.
Gated after migrate-dev for the same reason as build-dev: the new task
code runs against the dev DB, so the schema must be pushed first.

Uses Trigger.dev's remote build (no --local-build), so the runner needs
no Docker/buildx. Requires a TRIGGER_ACCESS_TOKEN repo secret.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015orsjbLX34FPFGujSK3AQK

* ci(trigger): source TRIGGER_PROJECT_ID from repo secret

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015orsjbLX34FPFGujSK3AQK

* ci(trigger): fail fast when Trigger.dev secrets are unset

Guard the deploy step so a missing TRIGGER_ACCESS_TOKEN or
TRIGGER_PROJECT_ID exits with a clear message instead of a cryptic
trigger.dev CLI error, matching the DATABASE_URL guard in migrations.yml.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015orsjbLX34FPFGujSK3AQK

* ci(migrations): fail dev db:push on interactive prompt or error

drizzle-kit push prompts interactively for ambiguous renames (--force only
covers data-loss). In CI there's no TTY, so the prompt reads EOF and drizzle
can exit 0 without applying — the job goes green while the schema change was
silently skipped. Close stdin, reject prompt markers, and require a success
marker so an unresolved rename or failed statement fails the job.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015orsjbLX34FPFGujSK3AQK

* ci(migrations): fail dev db:push when drizzle-kit hits a TTY prompt

drizzle-kit push needs a TTY to resolve ambiguous renames; in CI it throws
"Interactive prompts require a TTY terminal" but still exits 0, so the job
went green without applying the schema (e.g. run 28415609570). Fail on that
explicit error. Keys on drizzle's own stable message rather than fuzzy prompt
text, and a real non-zero exit still fails via set -e.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015orsjbLX34FPFGujSK3AQK

* ci(trigger): scope the access token secret as DEV_TRIGGER_ACCESS_TOKEN

The PAT is only used by the dev deploy job, so prefix it DEV_ to match the
repo's dev-scoped secret convention. TRIGGER_PROJECT_ID stays unprefixed —
it's the shared project (same one prod uses); dev-sim is a preview branch
within it, not a separate project.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015orsjbLX34FPFGujSK3AQK

* Adjust warning error

* ci: align build-dev checkout to v6 to match the other jobs

build-dev was the only job still pinning actions/checkout to the v4 hash;
every other job uses v6. Non-functional consistency fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015orsjbLX34FPFGujSK3AQK

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 22:02:59 -04:00
..