From 0255ab26bce5c53c96ef169cbbc0f3d649cfed3d Mon Sep 17 00:00:00 2001 From: Maarten de Kruijf Date: Thu, 7 Mar 2024 11:32:46 +0100 Subject: [PATCH] Check if head branch is of type feature/docs (#16) --- .github/workflows/hugo.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/hugo.yaml b/.github/workflows/hugo.yaml index 88425c35..ea6064cf 100644 --- a/.github/workflows/hugo.yaml +++ b/.github/workflows/hugo.yaml @@ -28,6 +28,7 @@ defaults: jobs: # Build job build-documentation: + if: startsWith(github.head_ref, 'feature/docs/**') || github.ref == 'refs/heads/master' && github.github.event_name == 'push' runs-on: ubuntu-latest env: HUGO_VERSION: 0.123.7 @@ -76,6 +77,7 @@ jobs: # Deployment job deploy-to-pages: + if: startsWith(github.head_ref, 'feature/docs/**') || github.ref == 'refs/heads/master' && github.github.event_name == 'push' environment: name: development-pages url: ${{ steps.deployment.outputs.page_url }}