Compare commits

..

1 Commits

Author SHA1 Message Date
84b3ef181a ci(build.yaml): add a guard step to skip builds for PRs targeting master or dev branches
All checks were successful
Build and Deploy Zola Website / build_and_deploy (push) Successful in 17s
Build Zola Website / build (pull_request) Successful in 26s
2025-08-27 18:47:58 +02:00

View File

@@ -4,12 +4,20 @@ on: pull_request
jobs: jobs:
build: build:
# Skip if PR base is master/dev
if: github.base_ref != 'master' && github.base_ref != 'dev'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check if PR targets master/dev
id: guard
run: |
if [ "${{ github.base_ref }}" = "master" ] || [ "${{ github.base_ref }}" = "dev" ]; then
echo "skip_build=true" >> $GITHUB_ENV
echo "This PR targets '${{ github.base_ref }}', skipping build (handled by deploy workflow)."
else
echo "skip_build=false" >> $GITHUB_ENV
echo "This PR targets '${{ github.base_ref }}', proceeding with build."
fi
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v2 uses: actions/checkout@v2