-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (55 loc) · 1.62 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
name: Docs
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Docs
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Autogenerate new documentation
continue-on-error: true
run: |
pip install -e .
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install pyyaml
python automate_mkdocs.py
git add .
- name: Update and Build GH Pages
run: |
python -m pip install --upgrade pip
pip install mkdocs==1.2.3
pip install mkgendocs==0.9.0
pip install markupsafe==2.0.1
pip install jinja2==2.11
gendocs --config mkgendocs.yml
- name: deploy
run: |
mkdocs gh-deploy --force --clean --verbose
- name: Commit any changes to docs
continue-on-error: true
run: |
git config --local user.name "github-actions[bot]"
git add ./docs
git commit -m "Auto-updating the docs"
- name: Push the changes to master
continue-on-error: true
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
force: true