From 18e9bfb0578b84cf399450b6f37b3fa7e74a717c Mon Sep 17 00:00:00 2001 From: Carsten Burgard Date: Fri, 7 Aug 2026 16:45:46 +0200 Subject: [PATCH 1/2] restrict deployment to main branch only the main branch should be able to deploy --- .github/workflows/docs.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6744d92..23ceac3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -37,6 +37,9 @@ jobs: # Add a dependency to the build job needs: build + # Deploy only after a push to the main branch. + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment permissions: pages: write # to deploy to Pages From 2284b644456050da7c82f43b5bf1f4f0c6feecf1 Mon Sep 17 00:00:00 2001 From: Carsten Burgard Date: Fri, 7 Aug 2026 16:48:40 +0200 Subject: [PATCH 2/2] removed spurious if --- .github/workflows/docs.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 23ceac3..37800a2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -53,9 +53,6 @@ jobs: # Specify runner + deployment step runs-on: ubuntu-latest - # Shouldn't run when the PR comes from a fork - if: ${{ !github.event.pull_request.head.repo.fork }} - steps: - name: Deploy to GitHub Pages id: deployment