Pipeline structure
# Illustrative structure, simplified; app names are placeholders
jobs:
deploy-staging:
strategy:
matrix:
app: [storefront, seller-dashboard, api]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- run: pnpm install --frozen-lockfile
- run: pnpm turbo run build --filter=${{ matrix.app }}...
- run: pnpm --filter ${{ matrix.app }} exec wrangler deploy --env staging
e2e:
needs: deploy-staging
steps:
- run: pnpm --filter e2e exec playwright test # against staging URLs
promote:
needs: e2e
environment: production # scoped secrets, optional approval
strategy: { matrix: { app: [storefront, seller-dashboard, api] } }
steps:
- run: pnpm --filter ${{ matrix.app }} exec wrangler deploy --env production
Principles
- Production receives the same commit that passed on staging.
- Bindings and secrets for each environment live in Wrangler config and GitHub environments, not in code.
- End-to-end tests run against the deployed staging services before promotion, which catches integration problems that unit tests miss.