Files
website/.gitea/workflows/build.yaml
Filip Rojek 84b3ef181a
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
ci(build.yaml): add a guard step to skip builds for PRs targeting master or dev branches
2025-08-27 18:47:58 +02:00

33 lines
843 B
YAML

name: Build Zola Website
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
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
uses: actions/checkout@v2
- name: Set up Zola
uses: taiki-e/install-action@v2
with:
tool: zola@0.17.2
- name: Build Zola Website
run: |
zola build