From 0859ee8a32af1ef7b7688299c974e952b4395a44 Mon Sep 17 00:00:00 2001 From: Saqib Date: Mon, 28 Sep 2026 16:40:25 +0530 Subject: [PATCH 1/4] ci(deploy): skip the CDS deploy for docs-only pushes --- .github/workflows/deploy-Dataspace.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/deploy-Dataspace.yml b/.github/workflows/deploy-Dataspace.yml index 3b7d9359..84a84e3b 100644 --- a/.github/workflows/deploy-Dataspace.yml +++ b/.github/workflows/deploy-Dataspace.yml @@ -5,6 +5,11 @@ on: branches: - dev - main + # Docs-only changes (Markdown, docs/, Read the Docs source) don't build, test or deploy + paths-ignore: + - '**.md' + - 'docs/**' + - 'cds_docs_femhealth/**' # Prevent two deploys to the same environment from racing each other and # corrupting the releases/ directory or the .last_good / .rollback_target markers. From 60a38443e94a94588adc32ce687a9ea9fb37a4af Mon Sep 17 00:00:00 2001 From: Saqib Date: Mon, 28 Sep 2026 16:40:25 +0530 Subject: [PATCH 2/4] ci(deploy): skip the IDS-DRR Dataspace deploy for docs-only pushes --- .github/workflows/deploy-IDS-Dataspace.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/deploy-IDS-Dataspace.yml b/.github/workflows/deploy-IDS-Dataspace.yml index 804a428c..2a229e62 100644 --- a/.github/workflows/deploy-IDS-Dataspace.yml +++ b/.github/workflows/deploy-IDS-Dataspace.yml @@ -3,6 +3,11 @@ name: Update IDS-DRR Dataspace on: push: branches: ['dev'] + # Docs-only changes (Markdown, docs/, Read the Docs source) don't build, test or deploy + paths-ignore: + - '**.md' + - 'docs/**' + - 'cds_docs_femhealth/**' env: KEYCLOAK_CLIENT_ID: ${{secrets.KEYCLOAK_CLIENT_ID}} KEYCLOAK_CLIENT_SECRET: ${{secrets.KEYCLOAK_CLIENT_SECRET}} From acd1870bd368027bbaacd38dfb5baf75ba81aeeb Mon Sep 17 00:00:00 2001 From: Saqib Date: Mon, 28 Sep 2026 16:40:25 +0530 Subject: [PATCH 3/4] ci(build): skip the dev build check for docs-only changes --- .github/workflows/pre-merge.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/pre-merge.yml b/.github/workflows/pre-merge.yml index d9a5d359..7e99d853 100644 --- a/.github/workflows/pre-merge.yml +++ b/.github/workflows/pre-merge.yml @@ -3,8 +3,18 @@ name: Build Status on: push: branches: ['dev'] + # Docs-only changes (Markdown, docs/, Read the Docs source) don't build, test or deploy + paths-ignore: + - '**.md' + - 'docs/**' + - 'cds_docs_femhealth/**' pull_request: branches: ['dev'] + # Docs-only changes (Markdown, docs/, Read the Docs source) don't build, test or deploy + paths-ignore: + - '**.md' + - 'docs/**' + - 'cds_docs_femhealth/**' jobs: build: From c6b3fe57ad159e474c56e20817531337b7a81c33 Mon Sep 17 00:00:00 2001 From: Saqib Date: Mon, 28 Sep 2026 16:40:25 +0530 Subject: [PATCH 4/4] ci(pr-gate): skip the full suite for docs-only PRs, report one PR Gate check --- .github/workflows/pr-gate.yml | 37 +++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-gate.yml b/.github/workflows/pr-gate.yml index d11ea871..d7fb9ef3 100644 --- a/.github/workflows/pr-gate.yml +++ b/.github/workflows/pr-gate.yml @@ -1,6 +1,9 @@ -# Full test suite against dev for every PR into main. Required by branch -# protection on main, so a PR merges (and prod deploys) only once it's green. +# Full test suite against dev for every PR into main. Branch protection on main +# requires the "PR Gate" job, so a PR merges (and prod deploys) only once it's green. # dev already runs the PR's code (it was merged to dev first). +# +# Docs-only PRs (Markdown, docs/, Read the Docs source) skip the suite. "PR Gate" +# still reports, so they stay mergeable. A skipped required check would block them. name: PR Gate on: @@ -12,8 +15,27 @@ concurrency: cancel-in-progress: true jobs: + changes: + name: Detect code changes + runs-on: ubuntu-latest + permissions: + pull-requests: read + outputs: + code: ${{ steps.filter.outputs.code }} + steps: + - id: filter + env: + GH_TOKEN: ${{ github.token }} + run: | + code=$(gh api --paginate "repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" \ + --jq '.[].filename' | grep -vE '\.md$|^docs/|^cds_docs_femhealth/' || true) + echo "code=$([ -n "$code" ] && echo true || echo false)" >> "$GITHUB_OUTPUT" + [ -n "$code" ] && printf 'Code changes:\n%s\n' "$code" || echo "Docs-only PR: skipping the full suite" + full-suite: name: Full Suite (dev) + needs: changes + if: needs.changes.outputs.code == 'true' uses: CivicDataLab/CivicDataSpace-test/.github/workflows/run-smoke.yml@CI with: suite: full @@ -25,3 +47,14 @@ jobs: TEST_EMAIL_2: ${{ secrets.TEST_EMAIL_2 }} TEST_PASSWORD_2: ${{ secrets.TEST_PASSWORD_2 }} KEYCLOAK_CLIENT_SECRET: ${{ secrets.KEYCLOAK_CLIENT_SECRET }} + + gate: + name: PR Gate + needs: [changes, full-suite] + if: always() + runs-on: ubuntu-latest + steps: + - run: | + echo "changes=${{ needs.changes.result }} full-suite=${{ needs.full-suite.result }}" + [ "${{ needs.changes.result }}" = success ] || exit 1 + case "${{ needs.full-suite.result }}" in success|skipped) ;; *) exit 1 ;; esac