Repository navigation
62 lines (52 loc) · 1.43 KB
/
Copy pathdocs.yml
File metadata and controls
62 lines (52 loc) · 1.43 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
52
53
54
55
56
57
58
59
60
61
62
name: docs
on:
push:
branches: [main]
paths:
- "docs/**"
- "src/benchx/schemas/**"
- "tools/gen_docs.py"
- "zensical.toml"
- "README.md"
- ".github/workflows/docs.yml"
pull_request:
branches: [main]
paths:
- "docs/**"
- "src/benchx/schemas/**"
- "tools/gen_docs.py"
- "zensical.toml"
- "README.md"
- ".github/workflows/docs.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- name: Generate derived pages (landing page, benchx page, schema reference)
run: uv run --python 3.12 --with-requirements docs/requirements.txt python tools/gen_docs.py
- name: Build site
run: uv run --python 3.12 --with-requirements docs/requirements.txt zensical build --strict --clean
- uses: actions/upload-pages-artifact@v3
with:
path: site
deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/configure-pages@v5
- id: deployment
uses: actions/deploy-pages@v4