Pipeline Overview
When each pipeline runs
| Pipeline | Trigger | Entry point |
|---|---|---|
| Staging | Pull request targeting main (and workflow_dispatch) | Staging Orchestrator |
| Production | Push to main (path-filtered per workflow) | Individual workflows: production-w-app-*, production-w-tool-* |
Staging flow
- On PR (or manual dispatch), the Staging Orchestrator runs.
- It detects affected packages via Turbo (
turbo run build --dry=json --affectedwith baseorigin/main). - It maps affected packages to targets: Next.js apps (game-client, backoffice-client), web-docs-client, storybook.
- It calls the corresponding reusable workflow only when that target is affected:
- Next.js →
staging-w-app-nextjs.yml(per target, currentlydeploy_target: local) - Web docs →
staging-w-tool-web-docs-client.yml - Storybook →
staging-w-tool-storybook.yml
- Next.js →
- A separate job validate-e2e runs lint and typecheck for the E2E package on every run.
No production deploy runs on PRs; staging only validates build and quality (E2E, Lighthouse where applicable).
Production flow
- On push to
main, each production workflow that has its path filters satisfied runs independently. - Path filters limit runs to when relevant app/tool (and shared deps) change.
- Next.js apps: deploy to Vercel → E2E production tests → Lighthouse. Web docs: build → deploy to GitHub Pages.
Diagram (high-level)
mermaid
flowchart LR
subgraph triggers [Triggers]
PR["Pull request to main"]
Push["Push to main"]
end
subgraph staging [Staging]
Orch["Staging Orchestrator"]
Next["Next.js workflow"]
WebDocs["Web Docs workflow"]
Storybook["Storybook workflow"]
ValidateE2E["Validate E2E"]
Orch --> Next
Orch --> WebDocs
Orch --> Storybook
Orch --> ValidateE2E
end
subgraph production [Production]
ProdGame["production-w-app-game-client"]
ProdBackoffice["production-w-app-backoffice-client"]
ProdWebDocs["production-w-tool-web-docs-client"]
end
PR --> Orch
Push --> ProdGame
Push --> ProdBackoffice
Push --> ProdWebDocs