mirror of
https://github.com/basnijholt/compose-farm.git
synced 2026-02-03 14:13:26 +00:00
67 lines
1.3 KiB
YAML
67 lines
1.3 KiB
YAML
name: Docs
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "docs/**"
|
|
- "zensical.toml"
|
|
- ".github/workflows/docs.yml"
|
|
pull_request:
|
|
paths:
|
|
- "docs/**"
|
|
- "zensical.toml"
|
|
- ".github/workflows/docs.yml"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: "pages-${{ github.ref }}"
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
lfs: true
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v4
|
|
|
|
- name: Set up Python
|
|
run: uv python install 3.12
|
|
|
|
- name: Install Zensical
|
|
run: uv tool install zensical
|
|
|
|
- name: Build docs
|
|
run: zensical build
|
|
|
|
- name: Setup Pages
|
|
if: github.event_name != 'pull_request'
|
|
uses: actions/configure-pages@v5
|
|
|
|
- name: Upload artifact
|
|
if: github.event_name != 'pull_request'
|
|
uses: actions/upload-pages-artifact@v4
|
|
with:
|
|
path: "./site"
|
|
|
|
deploy:
|
|
if: github.event_name != 'pull_request'
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|