Skip to content

Commit 9de8b82

Browse files
author
Vishikh Athavale
committed
workflow streamline
2 parents 021166b + 74fa1c3 commit 9de8b82

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy Sphinx Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'docs/**' # only trigger when docs/ changes
9+
- '.github/workflows/deploy-docs.yml'
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: 3.x
23+
24+
- name: Install dependencies
25+
run: |
26+
pip install sphinx pydata-sphinx-theme sphinx-copybutton
27+
28+
- name: Build HTML docs
29+
run: |
30+
sphinx-build -b html docs/source docs/build/html
31+
32+
- name: Deploy to GitHub Pages
33+
uses: peaceiris/actions-gh-pages@v4
34+
with:
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
publish_dir: docs/build/html
37+

0 commit comments

Comments
 (0)