diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aab01af..c8fda6f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,8 @@ jobs: name: Detect deploy-relevant changes runs-on: ubuntu-latest needs: ci - if: github.event_name != 'workflow_dispatch' + # Alleen relevant voor auto-deploy jobs; skip wanneer auto-deploy uit staat. + if: vars.AUTO_DEPLOY_ENABLED == 'true' && github.event_name != 'workflow_dispatch' outputs: code: ${{ steps.filter.outputs.code }} steps: @@ -95,8 +96,13 @@ jobs: name: Deploy Preview (PR) runs-on: ubuntu-latest needs: [ci, changes] + # Auto-deploy is uit. Gebruik "Run workflow" (workflow_dispatch) op de + # Actions-pagina voor handmatige deploys. Zet repo-variable + # AUTO_DEPLOY_ENABLED=true in Settings → Secrets and variables → Actions + # om PR-preview-deploys weer in te schakelen. if: | - github.event_name == 'pull_request' && ( + vars.AUTO_DEPLOY_ENABLED == 'true' + && github.event_name == 'pull_request' && ( (needs.changes.outputs.code == 'true' && !contains(github.event.pull_request.labels.*.name, 'skip-deploy')) || contains(github.event.pull_request.labels.*.name, 'force-deploy') @@ -128,8 +134,12 @@ jobs: name: Deploy Production (main) runs-on: ubuntu-latest needs: [ci, changes] + # Auto-deploy is uit. Gebruik "Run workflow" (workflow_dispatch) → + # target=production voor handmatige productie-deploys. Zet repo-variable + # AUTO_DEPLOY_ENABLED=true om push-naar-main weer auto te deployen. if: | - github.ref == 'refs/heads/main' + vars.AUTO_DEPLOY_ENABLED == 'true' + && github.ref == 'refs/heads/main' && github.event_name == 'push' && needs.changes.outputs.code == 'true' diff --git a/docs/INDEX.md b/docs/INDEX.md index 83f72d4..3c7670c 100644 --- a/docs/INDEX.md +++ b/docs/INDEX.md @@ -122,7 +122,7 @@ Auto-generated on 2026-05-07 from front-matter and headings. | [Agent-flow: open issues & decision log](./runbooks/agent-flow-pitfalls.md) | `runbooks/agent-flow-pitfalls.md` | active | 2026-05-03 | | [Auto-PR flow: van story-DONE naar gemergde PR](./runbooks/auto-pr-flow.md) | `runbooks/auto-pr-flow.md` | active | 2026-05-06 | | [Branch, PR & Commit Strategy](./runbooks/branch-and-commit.md) | `runbooks/branch-and-commit.md` | active | 2026-05-03 | -| [Deploy-controle: triggers, labels, path-filter](./runbooks/deploy-control.md) | `runbooks/deploy-control.md` | active | 2026-05-05 | +| [Deploy-controle: triggers, labels, path-filter](./runbooks/deploy-control.md) | `runbooks/deploy-control.md` | active | 2026-05-07 | | [Vercel Deployment](./runbooks/deploy-vercel.md) | `runbooks/deploy-vercel.md` | active | 2026-05-03 | | [MCP Integration — Scrum4Me Tools](./runbooks/mcp-integration.md) | `runbooks/mcp-integration.md` | active | 2026-05-03 | | [v1.0 Smoke Test Checklist](./runbooks/v1-smoke-test.md) | `runbooks/v1-smoke-test.md` | active | 2026-05-04 | diff --git a/docs/runbooks/deploy-control.md b/docs/runbooks/deploy-control.md index 8e59331..f0c9039 100644 --- a/docs/runbooks/deploy-control.md +++ b/docs/runbooks/deploy-control.md @@ -3,7 +3,7 @@ title: "Deploy-controle: triggers, labels, path-filter" status: active audience: [contributor, ai-agent] language: nl -last_updated: 2026-05-05 +last_updated: 2026-05-07 when_to_read: "Vóór een PR mergen, vóór doc-only changes pushen, of bij troubleshooting van Vercel-deployments." --- @@ -14,19 +14,27 @@ vanuit de GitHub Actions workflow `.github/workflows/ci.yml`. Vercel's eigen Git-integratie staat **uit** (`vercel.json: git.deploymentEnabled: false`) — de workflow is de enige bron van deploy-truth. +> **Auto-deploy staat momenteel UIT.** Zowel PR-preview als +> push-naar-main-productie deploys zijn afhankelijk van repo-variable +> `AUTO_DEPLOY_ENABLED=true`. Default ontbreekt die variable → beide +> auto-deploy-jobs worden overgeslagen om Actions-minuten te besparen. +> **Handmatig deployen blijft werken** via `workflow_dispatch` (zie +> onderaan). Aanzetten: *Settings → Secrets and variables → Actions → +> Variables → New repository variable → `AUTO_DEPLOY_ENABLED` = `true`*. + --- ## Triggers en defaults | Event | Default-deploy | |---|---| -| `push` naar `main` | Productie (`vercel deploy --prod`) — alleen als path-filter zegt "code" | -| `pull_request` naar `main` | Preview (`vercel deploy`) — alleen als path-filter zegt "code" en geen `skip-deploy` label | -| `workflow_dispatch` | Handmatig — kies `target: preview \| production` in Actions-tab | +| `push` naar `main` | Productie (`vercel deploy --prod`) — alleen als path-filter zegt "code" **en** `AUTO_DEPLOY_ENABLED=true` | +| `pull_request` naar `main` | Preview (`vercel deploy`) — alleen als path-filter zegt "code", geen `skip-deploy` label **en** `AUTO_DEPLOY_ENABLED=true` | +| `workflow_dispatch` | Handmatig — kies `target: preview \| production` in Actions-tab. Werkt altijd, ongeacht `AUTO_DEPLOY_ENABLED`. | CI (lint, typecheck, test, build) draait **altijd** op push/PR — ook -voor doc-only changes. Alleen de deploy-jobs respecteren path-filter -en labels. +voor doc-only changes. Alleen de deploy-jobs respecteren path-filter, +labels, en de `AUTO_DEPLOY_ENABLED` flag. ---