-
Notifications
You must be signed in to change notification settings - Fork 3.7k
44 lines (44 loc) · 1.17 KB
/
publish-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
name: publish-docs
on:
page_build:
branches:
- gh-pages
paths-ignore:
- 'docs/**'
workflow_run:
workflows: [update-doxygen]
types:
- completed
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Checkout gh-pages
run: |
git fetch origin gh-pages
git checkout gh-pages
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Generate html
run: |
make html
git rm -rf docs
mv _build/html docs
touch docs/.nojekyll
- name: Push changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "$GITHUB_ACTOR"
git add docs
if [ -n "$(git status --porcelain)" ]
then
git commit docs -m "Sphinx rebuild ($(git rev-parse --short gh-pages))."
git push origin gh-pages
fi