Skip to content

Commit abc66eb

Browse files
committed
add docs dev workflow
1 parent 1a0b187 commit abc66eb

File tree

3 files changed

+44
-39
lines changed

3 files changed

+44
-39
lines changed

.github/workflows/docs-dev.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Dev Documentation Build
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build-docs:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: '3.10'
17+
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install sphinx sphinx-rtd-theme sphinx-autodoc-typehints
22+
pip install -e .
23+
24+
- name: Build Sphinx documentation
25+
run: |
26+
cd docs/sphinx
27+
sphinx-build -b html source build/html
28+
29+
- name: Deploy to GitHub Pages
30+
uses: peaceiris/actions-gh-pages@v3
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
publish_dir: ./docs/sphinx/build/html
34+
destination_dir: docs/sphinx

.github/workflows/docs.yml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,26 @@ name: Build Documentation
22

33
on:
44
push:
5-
branches: [ main, master ]
6-
pull_request:
7-
branches: [ main, master ]
5+
branches: [ main]
86

97
jobs:
108
build-docs:
119
runs-on: ubuntu-latest
12-
1310
steps:
14-
- uses: actions/checkout@v4
15-
16-
- name: Set up Python
17-
uses: actions/setup-python@v4
18-
with:
19-
python-version: '3.10'
20-
21-
- name: Install dependencies
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-python@v5
13+
- name: Install dependencies
2214
run: |
2315
python -m pip install --upgrade pip
2416
pip install sphinx sphinx-rtd-theme sphinx-autodoc-typehints
2517
pip install -e .
26-
2718
- name: Build Sphinx documentation
2819
run: |
2920
cd docs/sphinx
3021
sphinx-build -b html source build/html
31-
32-
- name: Deploy to GitHub Pages
33-
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
34-
uses: peaceiris/actions-gh-pages@v3
35-
with:
36-
github_token: ${{ secrets.GITHUB_TOKEN }}
37-
publish_dir: ./docs/sphinx/build/html
38-
destination_dir: sphinx
22+
- name: Deploy to GitHub Pages
23+
uses: peaceiris/actions-gh-pages@v3
24+
with:
25+
github_token: ${{ secrets.GITHUB_TOKEN }}
26+
publish_dir: ./docs/sphinx/build/html
27+
destination_dir: docs/sphinx

docs/sphinx/build.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)