Debian Codegraph @

.github/workflows/docs.yml

raw symbols SCIP
1 # Update the API documentation whenever the `main` branch changes.
2 # This documentation lives in its own `docs` branch.
3 name: docs
4
5 on:
6 push:
7 branches:
8 - 'main'
9
10 jobs:
11 update-docs-branch:
12 runs-on: ubuntu-22.04 # getting errors from sphinx using ubuntu-24.04, so stuck on 22.04 till we diagnose it
13 permissions:
14 contents: write # allow push
15 steps:
16 - name: Checkout
17 uses: actions/checkout@v4
18 with:
19 submodules: true
20
21 - name: Update docs branch
22 run: |
23 python3 -m pip install --upgrade pip
24 python3 -m pip install --verbose ".[dev]"
25 ./scripts/make-docs.py
26
27 - name: Commit
28 run: |
29 git config --local user.email "[email protected]"
30 git config --local user.name "GitHub Action"
31 git add --force docs
32 git commit --message="update docs"
33
34 - name: Push to docs branch
35 uses: ad-m/[email protected]
36 with:
37 github_token: ${{ github.token }}
38 branch: docs
39 # Force push so that `docs` branch always looks like `main`,
40 # but with 1 additional "update docs" commit.
41 # This seems simpler than trying to cleanly merge `main` into
42 # `docs` each time.
43 force: true