Backoffice Client CI/CD Staging
Overview
The backoffice client (and game client) share the Staging – Next.js app workflow. Staging runs on pull requests when the orchestrator detects that @kartuli/backoffice-client or @kartuli/game-client is affected (Turbo build affected vs origin/main).
The orchestrator calls the reusable workflow staging-w-app-nextjs once per affected target (e.g. backoffice-client). Each run can use local (build + start + E2E + Lighthouse) or vercel (deploy preview + E2E against preview URL + Lighthouse).
Triggers
- Pull request targeting
main: the Staging Orchestrator runs, detects affected packages viaturbo run build --dry=json --affected, and calls the Next.js staging workflow for each ofgame-clientand/orbackoffice-clientwhen their package is in the affected set. - Paths that can affect the backoffice client include:
apps/backoffice-client/**, shared packages (e.g.packages/ui/**),package.json,pnpm-lock.yaml,turbo.json, and the workflow file itself.
Pipeline steps (per target)
- Checkout, CI setup (Node, dependencies).
- Validate monorepo package for the target.
- If deploy_target is local: Build, start server, run E2E (smoke), run Lighthouse.
- If deploy_target is vercel: Deploy to Vercel preview, run E2E against preview URL (with protection bypass), run Lighthouse.