Skip to content

Commit 3633db1

Browse files
committed
Update sphinx.yml
1 parent ab6064a commit 3633db1

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

.github/workflows/sphinx.yml

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
1-
name: "Sphinx: Render docs"
1+
name: documentation
22

3-
on: push
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
permissions:
6+
contents: write
47

58
jobs:
6-
build:
9+
docs:
710
runs-on: ubuntu-latest
8-
permissions:
9-
contents: write
1011
steps:
11-
- uses: actions/checkout@v4
12-
- name: Build HTML
13-
uses: ammaraskar/sphinx-action@master
14-
- name: Upload artifacts
15-
uses: actions/upload-artifact@v4
16-
with:
17-
name: html-docs
18-
path: docs/build/html/
19-
- name: Deploy
20-
uses: peaceiris/actions-gh-pages@v3
21-
if: github.ref == 'refs/heads/main'
22-
with:
23-
github_token: ${{ secrets.GITHUB_TOKEN }}
24-
publish_dir: docs/build/html
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
14+
- name: Install dependencies
15+
run: |
16+
pip install sphinx
17+
- name: Sphinx build
18+
run: |
19+
sphinx-build doc _build
20+
- name: Deploy to GitHub Pages
21+
uses: peaceiris/actions-gh-pages@v3
22+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
23+
with:
24+
publish_branch: gh-pages
25+
github_token: ${{ secrets.GITHUB_TOKEN }}
26+
publish_dir: _build/
27+
force_orphan: true

0 commit comments

Comments
 (0)