Repository navigation
OUT-4184: auto-deploy to Trigger.dev on merge to master - #288
Conversation
Add a self-contained deploy workflow that runs on push to master: typecheck, test, and lint gate a deploy job (needs all three) that runs `yarn trigger:deploy` with VERCEL_ENV=production so Sentry sourcemaps upload. Secrets come from the Production GitHub Environment. - concurrency group preserves commit order, never cancels in-flight - yarn install --immutable pins the deployed deps to the lockfile - permissions: contents:read and a deploy timeout for hardening - fix SENTRY_AUTHTOKEN typo in .env.example Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
| concurrency: | ||
| group: deploy-production | ||
| cancel-in-progress: false |
There was a problem hiding this comment.
deploy-production does not create a first-in, first-out queue. GitHub keeps only one pending run for a concurrency group and may replace it when another push arrives. With three quick merges, the middle workflow can be canceled before deploy, so this does not deploy every merge in commit order. Use a queue that records each commit, or state clearly that only the newest pending commit will deploy.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Switched to cancel-in-progress: true. Only the newest commit on master should deploy — an older in-flight run is superseded, and since master is linear the newer commit already contains the older one. A per-commit FIFO queue isn't a goal here.
- cancel-in-progress: true so newest master supersedes an in-flight run - pin actions/checkout and actions/setup-node to full commit SHAs across deploy.yml, test.yml, and lint.yml (mutable tags can be moved after a compromise); deploy job handles production secrets Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@greptileai review |
What
Adds a self-contained GitHub Actions workflow (
.github/workflows/deploy.yml) that auto-deploys to Trigger.dev's production environment on every merge tomaster, gated behind the existing Tests + Code Quality checks.Closes OUT-4184 (QuickBooks repo only — see follow-ups).
How it works
On push to
master, four jobs run:typecheck→yarn typecheck:testtest→yarn testlint→yarn lint:check && yarn prettier:checkdeploy→needs: [typecheck, test, lint], runsyarn trigger:deployThe three check jobs run in parallel;
deployonly starts if all three pass. They mirror the existingtest.yml/lint.ymlso the deploy gate is fully self-contained (no cross-workflow status coupling — easier to copy to the other integration repos).Sentry sourcemaps
The deploy job sets
VERCEL_ENV=production, which flips theisProdbranch intrigger.config.tsand uploads Sentry sourcemaps so production stack traces are readable. It passesSENTRY_ORG,SENTRY_PROJECT,SENTRY_AUTH_TOKEN,NEXT_PUBLIC_SENTRY_DSN, plusTRIGGER_ACCESS_TOKENandTRIGGER_PROJECT_ID.Secrets
All six secrets already exist in the repo's
ProductionGitHub Environment (scoped tomaster), which is why thedeployjob declaresenvironment: Production— environment-scoped secrets are only exposed to a job that names the environment.Hardening / robustness
concurrency: deploy-productionwithcancel-in-progress: false— queues deploys and preserves commit order.yarn install --immutablein all jobs — deployed deps provably match the lockfile.permissions: contents: readat workflow root.timeout-minutes: 20on the deploy job.SENTRY_AUTHTOKEN→SENTRY_AUTH_TOKENtypo in.env.example.Follow-ups (not in this PR)
Productionenvironment + secrets (distinctTRIGGER_PROJECT_ID).🤖 Generated with Claude Code