-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1.12 KB
/
documentation_generation.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: Build and Deploy Documentation
on:
push:
branches: [ master ]
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pandoc
run: sudo apt-get -y install pandoc
- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.11'
cache: 'pip'
- name: Install documentation dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx-rtd-theme nbsphinx ipykernel furo sphinx-autoapi recommonmark
- name: Install project dependencies
run: pip install -r requirements.txt
- name: Generate API documentation
run: sphinx-apidoc -o docs/source/ ./ setup.py
- name: Build Sphinx documentation
run: |
cd docs
make clean
make html
touch build/html/.nojekyll # Create the .nojekyll file
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html