From 86ea3be896eb7f3f77e99d4378f3d3326b48a320 Mon Sep 17 00:00:00 2001 From: S2D2 Date: Tue, 10 Nov 2026 20:29:28 +0000 Subject: [PATCH] ci: run CI once per PR push and scope Pages permissions to the deploy job CI and the pkg.pr.new dry publish trigger on both push (any branch) and pull_request, so every push to a PR branch runs both workflows twice. Limit push to main. Move pages: write and id-token: write from the workflow level to deploy-coverage, the only job that deploys Pages. Co-Authored-By: Claude Opus 5.5 Co-authored-by: Guillaume Lebedel <10488548+glebedel@users.noreply.github.com> --- .github/workflows/ci.yaml | 7 +++++-- .github/workflows/dry-publish.yaml | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f15e94dc..2a09db48 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,6 +2,8 @@ name: CI on: push: + branches: + - main pull_request: branches: - main @@ -12,8 +14,6 @@ concurrency: permissions: contents: read - pages: write - id-token: write jobs: gitleaks: @@ -269,6 +269,9 @@ jobs: deploy-coverage: needs: coverage runs-on: ubuntu-latest + permissions: + pages: write + id-token: write environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} diff --git a/.github/workflows/dry-publish.yaml b/.github/workflows/dry-publish.yaml index d9696d5f..e2e797bd 100644 --- a/.github/workflows/dry-publish.yaml +++ b/.github/workflows/dry-publish.yaml @@ -3,6 +3,8 @@ name: Dry Run Publish Package with pkg.pr.new on: pull_request: push: + branches: + - main jobs: dry-publish: