From fb046e16c617faf104bce4d040f1392e3f55b29a Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Date: Fri, 21 Jan 2022 11:37:08 +0000 Subject: [PATCH] Only restrict to deploying on pushes to `master` in the python/peps repo (#1996) --- .github/workflows/deploy-gh-pages.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index f9bf960099c..8f61e4b14a7 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -1,9 +1,6 @@ name: Deploy to GitHub Pages -on: - push: - branches: [main] - workflow_dispatch: +on: [push, pull_request, workflow_dispatch] jobs: deploy-to-pages: @@ -34,6 +31,8 @@ jobs: run: rm -r build/.doctrees/ - name: 🚀 Deploy to GitHub pages + # This allows CI to build branches for testing + if: github.ref == 'refs/heads/main' uses: JamesIves/github-pages-deploy-action@4.1.1 with: branch: gh-pages # The branch to deploy to.