-
Notifications
You must be signed in to change notification settings - Fork 12
66 lines (62 loc) · 1.69 KB
/
docs.yml
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
name: Build and Deploy Documentation
on:
push:
branches:
- 'master'
jobs:
configure:
name: Configure Versions
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.version-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- name: Fetch tags
run: git fetch --tags origin
- name: Set version matrix
id: version-matrix
run: echo "matrix=$(./.github/config.sh)" | tee $GITHUB_OUTPUT
build-docs:
name: Build Documentation
runs-on: ubuntu-latest
needs: configure
strategy:
matrix: ${{ fromJson(needs.configure.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.ref }}
- name: Install dependencies (apt)
run: sudo apt-get install -y python3-clang python3-pip
- name: Build docs
run: |
. venv
make html
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: doc/_build/html
if-no-files-found: error
deploy-docs:
name: Deploy Documentation
runs-on: ubuntu-latest
needs: build-docs
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
steps:
- uses: actions/download-artifact@v4
with:
path: .
- name: Add redirect to stable documentation
run: echo '<meta http-equiv="refresh" content="0; url=stable" />' > index.html
- run: find
- uses: actions/configure-pages@v3
- uses: actions/upload-pages-artifact@v3
with:
path: .
- id: deployment
uses: actions/deploy-pages@v4