File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Deploy Sphinx docs
2+
3+ on :
4+ push :
5+ branches : [ main ] # or your default branch
6+ workflow_dispatch :
7+
8+ jobs :
9+ build-and-deploy :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v4
15+
16+ - name : Set up Python
17+ uses : actions/setup-python@v5
18+ with :
19+ python-version : " 3.11"
20+
21+ - name : Install dependencies
22+ run : |
23+ python -m pip install --upgrade pip
24+ pip install sphinx
25+ # add any extensions you use, e.g.:
26+ # pip install myst-parser sphinx_rtd_theme
27+
28+ - name : Build docs
29+ working-directory : ./docs
30+ run : |
31+ sphinx-build -b html source _build/html
32+
33+ - name : Deploy to GitHub Pages
34+ uses : peaceiris/actions-gh-pages@v4
35+ with :
36+ github_token : ${{ secrets.GITHUB_TOKEN }}
37+ publish_dir : ./docs/_build/html
You can’t perform that action at this time.
0 commit comments