-
Notifications
You must be signed in to change notification settings - Fork 8
85 lines (73 loc) · 1.93 KB
/
Copy pathdocs.yml
File metadata and controls
85 lines (73 loc) · 1.93 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: docs
on:
push:
branches: [main]
paths:
- "docs/**"
- "mkdocs.yml"
- "pyproject.toml"
- "scripts/fetch_repository_stats.py"
- "uv.lock"
- ".github/workflows/docs.yml"
pull_request:
paths:
- "docs/**"
- "mkdocs.yml"
- "pyproject.toml"
- "scripts/fetch_repository_stats.py"
- "uv.lock"
- ".github/workflows/docs.yml"
schedule:
- cron: "17 0,12 * * *"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
python-version: "3.12"
- name: Refresh repository statistics
env:
GITHUB_TOKEN: ${{ github.token }}
run: python scripts/fetch_repository_stats.py
- name: Check lockfile
run: uv lock --check
- name: Install documentation dependencies
run: uv sync --group docs --locked --python 3.12
- name: Build documentation
run: uv run --frozen --group docs mkdocs build --strict
- name: Configure GitHub Pages
if: github.event_name != 'pull_request'
uses: actions/configure-pages@v5
- name: Upload GitHub Pages artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3
with:
path: site
deploy:
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- name: Deploy GitHub Pages
id: deployment
uses: actions/deploy-pages@v4