-
Notifications
You must be signed in to change notification settings - Fork 43
43 lines (38 loc) · 1.19 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
# Update the API documentation whenever the `main` branch changes.
# This documentation lives in its own `docs` branch.
name: docs
on:
push:
branches:
- 'main'
jobs:
update-docs-branch:
runs-on: ubuntu-22.04 # latest
permissions:
contents: write # allow push
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Update docs branch
run: |
python3 -m pip install -r requirements-dev.txt
python3 -m pip install --verbose .
./scripts/make-docs.py
- name: Commit
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add --force docs
git commit --message="update docs"
- name: Push to docs branch
uses: ad-m/[email protected]
with:
github_token: ${{ github.token }}
branch: docs
# Force push so that `docs` branch always looks like `main`,
# but with 1 additional "update docs" commit.
# This seems simpler than trying to cleanly merge `main` into
# `docs` each time.
force: true