File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy Sphinx Documentation
2+
3+ on :
4+ workflow_dispatch :
5+
6+ jobs :
7+ build :
8+ runs-on : ubuntu-latest
9+
10+ steps :
11+ - name : Checkout code
12+ uses : actions/checkout@v4
13+
14+ - name : Set up Python
15+ uses : actions/setup-python@v5
16+ with :
17+ python-version : ' 3.10'
18+
19+ - name : Install dependencies
20+ run : |
21+ pip install -r requirements.txt
22+ pip install -r docs/requirements.txt
23+
24+ - name : Generate rst files
25+ run : sphinx-apidoc -o docs/source src/mastermind -f --templatedir=docs/source/_templates --maxdepth=2 --module-first
26+
27+ - name : Build documentation
28+ run : |
29+ cd docs
30+ make html
31+
32+ - name : Deploy to GitHub Pages
33+ if : success()
34+ uses : peaceiris/actions-gh-pages@v3
35+ with :
36+ github_token : ${{ secrets.GITHUB_TOKEN }}
37+ publish_dir : ./docs/build/html
38+ publish_branch : gh-pages
39+ keep_files : false # remove old files
You can’t perform that action at this time.
0 commit comments