Skip to content

CI

Purpose

The validate job - runs on every PR and every push to main, gates deploy-production.

File

.github/workflows/ci.yml

Triggers

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
  workflow_dispatch:
workflow_dispatch only ever runs validate - deploy-production's own if condition requires github.event_name == 'push', which a manual dispatch never satisfies (see Deployment).

The validate job, in exact order

Checkout
Setup Node (22)
Install dependencies         -> npm install --no-audit --no-fund
Check portal style drift     -> npm run check:portal-styles-drift
Build applications           -> npm run build   (all 7 apps)
Type-check API                -> npx tsc -p workers/api/tsconfig.json
Unit tests                     -> npm test       (Vitest)

A PR never deploys and never runs the production smoke test - deploy-production only exists on the workflow run triggered by a merge landing on main, never on a pull_request event. This is deliberate isolation, per docs/DEPLOYMENT.md §1.

Reproduce locally

npm install --no-audit --no-fund
npm run check:portal-styles-drift
npm run build
npx tsc -p workers/api/tsconfig.json
npm test
Exact same commands CI runs, in the same order.

Troubleshooting

Step failing What to check
Install dependencies Lockfile drift - see Local → Troubleshooting
Check portal style drift npm run sync:portal-styles then commit the regenerated files
Build applications Isolate with npm run build:<app>
Type-check API workers/api/tsconfig.json errors - run npx tsc -p workers/api/tsconfig.json locally
Unit tests npm test locally to reproduce