Repository navigation
67 lines (56 loc) · 1.42 KB
/
Copy pathdocs.yml
File metadata and controls
67 lines (56 loc) · 1.42 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
name: Documentation
on:
push:
branches:
- main
pull_request:
release:
types: [published]
workflow_dispatch:
env:
FORCE_COLOR: 1
UV_NO_SYNC: 1
permissions:
contents: read # for checkout
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-docs:
name: Build
runs-on: ubuntu-26.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@v7.1.0
- name: Install uv
uses: astral-sh/setup-uv@v10.3.3
with:
enable-cache: false
- name: Build documentation
run: uvx --with tox-uv tox -e docs
- name: Check for uncommitted autogenerated docs
run: git diff --exit-code docs
- name: Upload documentation as artifact
id: deployment
uses: actions/upload-pages-artifact@v5.0.0
with:
path: site
publish-docs:
name: Publish
runs-on: ubuntu-26.04
timeout-minutes: 5
needs: [ build-docs ]
permissions:
pages: write # for deploy-pages
id-token: write # for deploy-pages OIDC authentication
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: ${{ github.event_name == 'release' }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5.0.1