Skip to content

Commit 740551b

Browse files
committed
Refactor Sphinx workflow to set up Python environment and install dependencies before building documentation
1 parent 1912eea commit 740551b

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

.github/workflows/sphinx.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,29 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v4
10-
- name: Build HTML
11-
uses: ammaraskar/sphinx-action@master
10+
11+
- name: Set up Python 3.10
12+
uses: actions/setup-python@v4
1213
with:
13-
docs-folder: docs/
14+
python-version: '3.10'
15+
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install poetry
20+
poetry install --with docs
21+
22+
- name: Build docs
23+
run: |
24+
cd docs
25+
poetry run sphinx-build -b html . _build/html
26+
1427
- name: Upload artifacts
1528
uses: actions/upload-artifact@v4
1629
with:
1730
name: html-docs
1831
path: docs/_build/html/
32+
1933
- name: Deploy
2034
uses: peaceiris/actions-gh-pages@v4
2135
if: github.ref == 'refs/heads/main'

0 commit comments

Comments
 (0)