File tree Expand file tree Collapse file tree 3 files changed +45
-0
lines changed
Expand file tree Collapse file tree 3 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Deploy Documentation
2+
3+ on :
4+ push :
5+ branches : ["master"]
6+ workflow_dispatch :
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ deploy-docs :
13+ name : Build and deploy documentation to gh-pages
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v3
17+
18+ - name : Set up Python
19+ uses : actions/setup-python@v4
20+ with :
21+ python-version : " 3.9"
22+
23+ - name : Install dependencies
24+ run : |
25+ python -m pip install --upgrade pip
26+ pip install .
27+ pip install sphinx sphinx-rtd-theme myst-parser nbsphinx matplotlib
28+
29+ - name : Build documentation
30+ run : |
31+ rm -rf docs
32+ mkdir -p docs
33+ sphinx-build -M html doc_source docs
34+ rsync -a docs/html/ docs/
35+ rm -rf docs/html
36+ touch docs/.nojekyll
37+
38+ - name : Deploy to GitHub Pages
39+ uses : peaceiris/actions-gh-pages@v3
40+ with :
41+ github_token : ${{ secrets.GITHUB_TOKEN }}
42+ publish_dir : ./docs
43+ publish_branch : gh-pages
44+ force_orphan : true
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ instance/
7272.scrapy
7373
7474# Sphinx documentation
75+ docs /
7576docs /_build /
7677
7778# PyBuilder
You can’t perform that action at this time.
0 commit comments