-
-
Notifications
You must be signed in to change notification settings - Fork 129
48 lines (41 loc) · 1.21 KB
/
update-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
name: update docs
on:
push:
branches:
- main
jobs:
update-docs:
name: update docs
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: main
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Dependencies & generate Docs
run: |
sudo apt-get install python3-sphinx
python3 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
pip install wheel
pip install -r requirements.txt
pip install -e .
pip install sphinxemoji sphinx_rtd_theme recommonmark
cd docsource && make github && cd ..
- name: Check if there are any changes
id: verify_diff
run: |
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
- name: push docs
if: steps.verify_diff.outputs.changed == 'true'
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git add docs/*
git commit -m "update docs [bot]"
git push