-
Notifications
You must be signed in to change notification settings - Fork 13
51 lines (45 loc) · 1.33 KB
/
docs.yml
File metadata and controls
51 lines (45 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Documentation
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
permissions:
contents: write
jobs:
# Verify docs build cleanly on PRs
build:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v7
with:
python-version: "3.13"
enable-cache: true
- run: uv sync --group doc
- run: uv run zensical build --clean
deploy:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v7
with:
python-version: "3.13"
enable-cache: true
- run: uv sync --group doc
- run: git config user.name "github-actions[bot]"
- run: git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Deploy dev docs
if: github.ref == 'refs/heads/main'
run: uv run mike deploy --push dev
- name: Deploy release docs
if: startsWith(github.ref, 'refs/tags/v')
run: uv run mike deploy --push --update-aliases "${GITHUB_REF_NAME#v}" stable
- name: Set default to stable
if: startsWith(github.ref, 'refs/tags/v')
run: uv run mike set-default --push stable