Skip to content

Commit 341e2cd

Browse files
authored
Changes to sphinx workflow (#168)
* Changes to sphinx workflow * yank and fix python version for docs * Add preview deployment for PRs
1 parent d71288f commit 341e2cd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/sphinx.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ jobs:
2121

2222
- name: Set up Python
2323
uses: actions/setup-python@v3
24+
with:
25+
python-version: "3.11"
2426

2527
- name: Install dependencies
2628
run: |
2729
python -m pip install --upgrade pip
30+
pip install -r requirements.txt
2831
python -m pip install sphinx furo
2932
3033
- name: Sphinx build
@@ -33,6 +36,15 @@ jobs:
3336
sphinx-apidoc -o docs/source piqture
3437
sphinx-build docs/source docs/_build/html
3538
39+
- name: Deploy to preview branch for PRs
40+
uses: peaceiris/actions-gh-pages@v3
41+
if: github.event_name == 'pull_request'
42+
with:
43+
publish_branch: docs-preview/${{ github.head_ref }}
44+
github_token: ${{ secrets.GITHUB_TOKEN }}
45+
publish_dir: docs/_build/html
46+
force_orphan: true
47+
3648
- name: Deploy to gh-pages
3749
uses: peaceiris/actions-gh-pages@v3
3850
if: ${{ github.ref == 'refs/heads/main' }}

0 commit comments

Comments
 (0)