CI/CD (Continuous Integration and Continuous Deployment) is how a change gets from a pull request to production. Our pipelines build, test and deploy every change.
We use GitHub, and all CI runs on Depot CI.
We prefer small pull requests that ship many times a day. A small change is easier to review and to roll back.
Every pull request runs our checks: tests, linting, type checks and builds. A change cannot merge until the checks pass and it has an approval.
To see a change before it merges to main:
deploy-staging label to deploy the PR to our staging environment.We ask for reviews in the #review-pr Slack channel by @-ing a person with context or the relevant squad.
AI reviewers also review every PR. For a small change, an AI reviewer can approve it.
An approved PR goes into a merge queue. The queue tests it together with the PRs ahead of it, then squash merges it
into main. This catches two PRs that pass alone but fail together before they reach main.
Every merge to main builds the changed apps and deploys them to staging. We build each image once. Staging and
production run that same image.
Production deploys from the production branch. Every 5 minutes, a deploy train rebases it onto the newest commit on
main where all checks passed. When a change must go out sooner, we promote it by hand.
Database migrations run before the apps deploy, so the code must be backward compatible with both schemas. A schema change usually needs a follow-up PR that makes the new code the default.
Each deploy also gets a tag and a GitHub Release, so we can see what is live and what changed.
A deploy does not have to release a feature to users. We use feature flags to separate deployments from releases.
We fix forward on main. There are no hotfix branches and no commits that exist only on production.
When production is broken, we stop the impact first:
production to the tag. We use it when more than
one app is broken or the bad deploy changed infrastructure.main. A rollback freezes production
automatically.Then we ship the fix through the normal path and lift the freeze. See how we handle incidents for the rest.
Every staging and production deploy posts to a Slack channel, with the result in a thread. Production deploy messages mention the author of every change they ship. When a deploy fails, an AI agent reads the logs and opens a fix or revert PR.
We can roll back from Slack. A freeze and its lift both mention the whole engineering team, so everyone sees when production is frozen.