From e4a584954148c5d3badd79721e71187d3f7dba4d Mon Sep 17 00:00:00 2001 From: Michael Lombardi Date: Fri, 5 May 2023 07:34:30 -0500 Subject: [PATCH] (MAINT) Build docs on PR, Publish on push This change modifies the GHA for the docs site to build the docs on a PR but only publish them on a push to `main`. This way, future docs changes that break the build can be caught before a merge. --- .github/workflows/hugo.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/hugo.yaml b/.github/workflows/hugo.yaml index d64bb775..24608b13 100644 --- a/.github/workflows/hugo.yaml +++ b/.github/workflows/hugo.yaml @@ -6,6 +6,7 @@ on: push: branches: - main + pull_request: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -78,6 +79,7 @@ jobs: # Deployment job deploy: + if: github.ref == 'refs/heads/main' environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }}