-
Notifications
You must be signed in to change notification settings - Fork 7
57 lines (47 loc) · 1.5 KB
/
docs_pages.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
name: docs_pages_workflow
# execute this workflow automatically when a we push to master
on:
push:
branches: [ main ]
jobs:
build_docs_job:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install composipy
python -m pip install -r doc_requirements.txt
sudo apt install pandoc
- name: make the sphinx doc
run: |
make -C doc clean
# sphinx-apidoc -f -o doc/source . -H Test -e -t doc/source/_templates
make -C doc html
- name: Init new repo in dist folder and commit generated files
run: |
cd ./doc/_build/html/
git init
touch .nojekyll
git add -A
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -m 'deploy'
- name: Force push to destination branch
#uses: ad-m/[email protected]
#with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: gh-pages
# force: true
# directory: ./doc/_build/html
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/_build/html