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+ ---
2+ name : Sphinx build
3+
4+ on :
5+ push :
6+ branches :
7+ - master
8+
9+ jobs :
10+ sphinx-build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+ - uses : actions/setup-python@v4
15+ with :
16+ python-version : ' 3.13'
17+ cache : ' pip' # caching pip dependencies
18+ - run : pip install .[release]
19+
20+ - name : Build HTML
21+ run : ./action/build_docs.sh
22+
23+ - name : Upload artifacts
24+ uses : actions/upload-artifact@v1
25+ with :
26+ name : html-docs
27+ path : ./sphinx_output/
28+
29+ - name : Deploy
30+ uses : peaceiris/actions-gh-pages@v3
31+ if : github.ref == 'refs/heads/master'
32+ with :
33+ github_token : ${{ secrets.GITHUB_TOKEN }}
34+ publish_dir : ./sphinx_output
35+ ...
Original file line number Diff line number Diff line change @@ -6,4 +6,5 @@ __pycache__/
66* .pyc
77/.vscode /
88/build
9+ /sphinx_output
910/venv
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ These features will be included in the next release:
55
66Added
77-----
8+ - Add readthedocs site
89- New exit codes 2 for file not found, 3 for invalid command line arguments, 4 for
910 missing dependencies and 123 for unknown failures.
1011- Display exit code in parentheses after error message.
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ THEME=" sphinx_rtd_theme"
4+ OUTPUT_DIR=" ../sphinx_output"
5+ REPO_DIR=$PWD
6+
7+ mkdir -p ../sphinx_project/source
8+ pushd ../sphinx_project
9+
10+ pip install $THEME
11+
12+ cat << EOL > source/conf.py
13+ project = "README"
14+ html_theme = "$THEME "
15+ EOL
16+
17+ cp " ../README.rst" ../sphinx_project/source/index.rst
18+ sphinx-build -b html source $OUTPUT_DIR
19+
20+ popd
21+ mv ../sphinx_project/$OUTPUT_DIR .
22+ rm -rf ../sphinx_project
Original file line number Diff line number Diff line change 8383 wheel>=0.21.0
8484release =
8585 darkgray-dev-tools~=0.1.1
86+ sphinx
87+ sphinx-rtd-theme
8688
8789[flake8]
8890# Line length according to Black rules
You can’t perform that action at this time.
0 commit comments