From 067730dde8e34c4ce92bddb31e07e8ac75f4fd91 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Apr 2026 12:06:37 +0000 Subject: [PATCH 1/3] Initial plan From 910b76e218b7a1491631fd21c1d5124be35d7bba Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Apr 2026 12:07:44 +0000 Subject: [PATCH 2/3] fix: skip GitHub Pages deploy on pull_request events - Add `if: github.event_name == 'push' && github.ref == 'refs/heads/master'` to the peaceiris/actions-gh-pages step so it only runs on pushes to master (or workflow_dispatch), never on pull_request events including Dependabot PRs. - Add `permissions: contents: write` at workflow level so GITHUB_TOKEN can push to gh-pages when deploying from master. Agent-Logs-Url: https://github.com/FerreolS/InverseProblemsCookbook/sessions/4c98b4c1-a82d-4aa7-b2c0-b16a9af4ff1b Co-authored-by: FerreolS <10050083+FerreolS@users.noreply.github.com> --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 50e69b5..2d7f295 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,10 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: - # A workflow run is made up of one or more jobs that can run sequentially or in parallel +permissions: + contents: write + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" build: @@ -32,6 +35,7 @@ jobs: - run: mkdir pdf - run: mv *{.svg,.pdf} pdf/. - uses: peaceiris/actions-gh-pages@v3 + if: github.event_name == 'push' && github.ref == 'refs/heads/master' with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./pdf From 968bb9f822305f133ee94ec3a3f8b1244a65b73c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Apr 2026 12:17:36 +0000 Subject: [PATCH 3/3] fix: remove unnecessary permissions: contents: write The original failure was only on PRs; master push deployments were already working, so the top-level permissions block is not required. The `if:` condition on the deploy step is sufficient to fix the issue. Agent-Logs-Url: https://github.com/FerreolS/InverseProblemsCookbook/sessions/aafe25f5-e7fa-42ff-ae95-82583ac27d7f Co-authored-by: FerreolS <10050083+FerreolS@users.noreply.github.com> --- .github/workflows/main.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2d7f295..babe5fd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,9 +13,6 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: -permissions: - contents: write - # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build"