Skip to content

Merge pull request #8 from leejuyuu/artifact #14

Merge pull request #8 from leejuyuu/artifact

Merge pull request #8 from leejuyuu/artifact #14

Workflow file for this run

name: Zola on GitHub Pages
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
submodules: true
- name: Build only
uses: shalzz/[email protected]
env:
BUILD_DIR: .
BUILD_ONLY: true
BUILD_FLAGS: --drafts
# A GitHub token is not necessary when BUILD_ONLY is true
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact # For testing or debugging
uses: actions/upload-artifact@v4
with:
name: public
path: ./public
build_and_deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout main
uses: actions/checkout@v4
- name: Build and deploy
uses: shalzz/[email protected]
env:
BUILD_DIR: .
PAGES_BRANCH: gh-pages
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}