File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and Deploy Documentation
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ permissions :
10+ contents : write
11+
12+ jobs :
13+ build-and-deploy :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@v4
19+
20+ - name : Set up Python
21+ uses : actions/setup-python@v5
22+ with :
23+ python-version : ' 3.11'
24+
25+ - name : Install dependencies
26+ run : |
27+ pip install -r docs/requirements.txt
28+
29+ - name : Build documentation
30+ run : |
31+ cd docs
32+ sphinx-build -b html . _build/html
33+
34+ - name : Deploy to GitHub Pages
35+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
36+ uses : peaceiris/actions-gh-pages@v4
37+ with :
38+ github_token : ${{ secrets.GITHUB_TOKEN }}
39+ publish_dir : ./docs/_build/html
40+ force_orphan : true
You can’t perform that action at this time.
0 commit comments