worldmonitor icon indicating copy to clipboard operation
worldmonitor copied to clipboard

Add Convex prod deployment to CI/CD pipeline

Open SebastienMelki opened this issue 8 months ago • 2 comments

Context

Convex production deployment (npx convex deploy) is currently manual. After merging to main, someone has to remember to run it locally. This is error-prone — Vercel deploys automatically but Convex doesn't, so the frontend and backend can drift.

What

Add a GitHub Actions workflow that runs npx convex deploy on push to main.

Requirements

  • Trigger on push to main (or on PR merge)
  • Run npx convex deploy --cmd 'npm run build' with CONVEX_DEPLOY_KEY secret
  • Only deploy if convex/ files changed (optional optimization)
  • Should run after tests pass

References

  • Convex CI/CD docs: https://docs.convex.dev/production/hosting/
  • Current prod deployment: tacit-curlew-777
  • Dev deployment: valiant-bison-406

Came up during the better-auth integration (PR #1812) — adding auth plugins requires Convex redeployment which currently isn't automated.

SebastienMelki avatar Mar 19 '26 15:03 SebastienMelki

This is straightforward now that Clerk is wired. The workflow needs:

  1. CONVEX_DEPLOY_KEY as a repo secret (from Convex dashboard)
  2. A workflow step running npx convex deploy
  3. Path filter for convex/** to avoid unnecessary deploys

@koala73 — should this deploy only on push to main, or also on PR merge events? Happy to open a PR.

SebastienMelki avatar Mar 30 '26 20:03 SebastienMelki

Opened PR #2752 to automate Convex production deploys after the existing merge gate succeeds on main.

It deploys only when the gated merge commit changes convex/**, package.json, or package-lock.json, and uses CONVEX_DEPLOY_KEY from repository secrets.

PR: https://github.com/koala73/worldmonitor/pull/2752

shinzoxD avatar Apr 05 '26 20:04 shinzoxD