YeetCode
Guides

Production Deployments — Backend

Manage Convex backend deployments using release-please and GitHub Actions.

YeetCode uses release-please to automate versioning and changelogs, combined with GitHub Actions to deploy the Convex backend to production when a new version is tagged.

How It Works

The deployment pipeline has two stages:

  1. release-please watches commits on main and opens a release PR that bumps the version, updates CHANGELOG.md, and updates package.json
  2. When the release PR is merged, a git tag is created (e.g. convex-backend@v1.4.0), which triggers the deploy workflow
commit to main → release-please PR → merge → tag created → deploy workflow runs

Tag Format

Tags follow the pattern convex-backend@v{version} (e.g. convex-backend@v1.3.0). This is configured in release-please-config.json:

{
  "include-component-in-tag": true,
  "include-v-in-tag": true,
  "tag-separator": "@",
  "separate-pull-requests": true,
  "packages": {
    "apps/convex-backend": {
      "release-type": "node",
      "changelog-path": "CHANGELOG.md",
      "component": "convex-backend"
    }
  }
}

Production Deploy Workflow

The workflow at .github/workflows/deploy-backend.yaml triggers on convex-backend@v* tags and runs bunx convex deploy:

on:
  push:
    tags:
      - convex-backend@v*

jobs:
  deploy-convex:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: oven-sh/setup-bun@v1
      - run: bun install
      - run: bunx convex deploy
        working-directory: apps/convex-backend
        env:
          CONVEX_DEPLOY_KEY: ${{ secrets.CONVEX_DEPLOY_KEY_PRODUCTION }}

Setup Steps

1. Get Your Convex Deploy Keys

You need deploy keys for both your production and test Convex projects.

  1. Go to dashboard.convex.dev
  2. Select your production project → Settings → Deploy Key → copy it
  3. Select your test/dev project → Settings → Deploy Key → copy it

2. Add GitHub Secrets

In your GitHub repo, go to Settings → Secrets and variables → Actions and add:

SecretDescription
CONVEX_DEPLOY_KEY_PRODUCTIONDeploy key for your production Convex project
MY_RELEASE_PLEASE_TOKENGitHub PAT with repo + pull-requests permissions

3. Create the Release-Please Token

release-please needs a GitHub Personal Access Token (not the default GITHUB_TOKEN) to create release PRs and tags:

  1. Go to github.com/settings/tokensFine-grained tokens
  2. Create a token scoped to your YeetCode repo with permissions:
    • Contents: Read and write
    • Pull requests: Read and write
  3. Save it as MY_RELEASE_PLEASE_TOKEN in your repo secrets

4. Use Conventional Commits

release-please determines version bumps from commit messages. Use the Conventional Commits format:

Commit prefixVersion bumpExample
fix:Patch (1.3.0 → 1.3.1)fix(backend): handle null user in webhook
feat:Minor (1.3.0 → 1.4.0)feat(backend): add Stripe webhook handler
feat!: or BREAKING CHANGE:Major (1.3.0 → 2.0.0)feat!: redesign auth flow

Commits that don't match a conventional prefix (e.g. chore:, docs:, refactor:) won't trigger a version bump but will still appear in the changelog.

Files Involved

FilePurpose
release-please-config.jsonDefines which packages release-please manages
release-please-manifest.jsonTracks the current version of each package (auto-updated)
.github/workflows/release-please.yamlCreates release PRs and tags on push to main
.github/workflows/deploy-backend.yamlDeploys to production Convex on convex-backend@v* tags
apps/convex-backend/CHANGELOG.mdAuto-generated changelog
apps/convex-backend/package.jsonVersion field auto-updated by release-please

Deploying Manually

If you need to deploy without going through the release flow:

# Deploy to production (requires CONVEX_DEPLOY_KEY env var)
cd apps/convex-backend
CONVEX_DEPLOY_KEY=your-key bunx convex deploy

# Deploy to dev (uses your local Convex auth)
cd apps/convex-backend
bunx convex deploy

On this page