33 lines
843 B
YAML
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
|
|
|