From 43defdc9bcdafcb53bd7b62a1c80c2c68c3b915d Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Tue, 7 Oct 2025 23:27:03 +0200 Subject: [PATCH] Add PR trigger and guard pages deployment --- .github/workflows/book.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index 090e56d..8ca1340 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -5,6 +5,9 @@ on: push: branches: - main + pull_request: + branches: + - main # This job installs dependencies, build the book, and pushes it to `gh-pages` jobs: @@ -50,6 +53,7 @@ jobs: # Push the book's HTML to github-pages - name: GitHub Pages action + if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }}