Skip to main content

CI

.github/workflows/ci.yml runs on every pull request and every push to main. A pull request that fails a check does not merge. The tenant isolation tests need the real database. They try to read another organization’s requests and must fail.

The web app

Vercel deploys the web app from GitHub automatically. Vercel’s environment variables are in Terraform (vercel.tf): API_URL for production and preview, and NEXT_PUBLIC_SITE_URL for production. A changed variable reaches the site only with the next deploy.

The API

The Deploy the API job:
1

Signs in to AWS

Through GitHub’s OIDC provider, as the oncoeverything-deploy role. There is no access key anywhere.
2

Builds and pushes the image

The tag is the first seven characters of the commit. The ECR repository does not let a push overwrite a tag, so a tag always means the same image.
3

Registers a task definition and rolls the service

The new task runs migrations, then opens its port. The old task serves until the new one passes the health check.
4

Waits for the service to be stable

If the new task never becomes healthy, the service’s circuit breaker rolls back to the previous one.
Check a deploy:

The handbook

Mintlify deploys the handbook from the handbook/ folder on each push to main.

Roll back

The web app. In the Vercel dashboard, open Deployments. Find the last good deployment. Promote it. The API. Point the service at the previous task definition revision:
ECR keeps the last ten images.
Neither rollback undoes a database migration. Write a new migration that fixes it.