name: Documentation
on:
push:
branches: [main]
paths:
- "site_docs/**"
- "zensical.toml"
- ".github/workflows/docs.yml"
- "README.md"
- "CHANGELOG.md"
- "LICENSE"
pull_request:
branches: [main]
paths:
- "site_docs/**"
- "zensical.toml"
- ".github/workflows/docs.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: Install dependencies
run: uv pip install --system zensical
- name: Build documentation
run: zensical build --clean
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: ./site
deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5