File tree Expand file tree Collapse file tree 2 files changed +48
-1
lines changed
Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Update Docs with Versioning
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : write
11+
12+ jobs :
13+ build-docs :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout Repository
18+ uses : actions/checkout@v3
19+ with :
20+ fetch-depth : 0
21+
22+ - name : Set up Python
23+ uses : actions/setup-python@v4
24+ with :
25+ python-version : 3.x
26+
27+ - name : Install Dependencies
28+ run : |
29+ python -m pip install --upgrade pip
30+ pip install sphinx
31+
32+ - name : Run Sphinx-apidoc
33+ run : |
34+ cd docs
35+ sphinx-apidoc ../src -o ./source
36+
37+ - name : Commit and Push to Generated Docs Branch
38+ env :
39+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
40+ run : |
41+ git config --global user.name "github-actions[bot]"
42+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
43+ git checkout -b generated-docs || git checkout generated-docs
44+ git add .
45+ git commit -m "Update docs for version $GITHUB_REF_NAME [skip ci]" || echo "No changes to commit"
46+ git push origin generated-docs
Original file line number Diff line number Diff line change 22# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
33
44# Required
5- version : 2
5+ version :
6+ type : tag
67
78# Set the OS, Python version and other tools you might need
89build :
You can’t perform that action at this time.
0 commit comments