Skip to content

Commit e26ba3e

Browse files
authored
Refactor Sphinx build workflow for deployment
Updated the workflow to improve documentation deployment and added a release step.
1 parent 7af58bd commit e26ba3e

File tree

1 file changed

+19
-23
lines changed

1 file changed

+19
-23
lines changed

.github/workflows/sphinx-build.yml

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
name: "Deploy Documentation"
1+
name: "Continuous Deployment"
22

33
on:
44
push:
55
tags:
66
- "*"
77

88
jobs:
9-
docs:
9+
10+
#############################################################################
11+
# Create and online deployment of the documentation #########################
12+
docs: #######################################################################
1013
runs-on: ubuntu-latest
1114
steps:
1215
- uses: actions/checkout@v4
@@ -17,40 +20,33 @@ jobs:
1720
auto-update-conda: true
1821
python-version: 3.10
1922

20-
- name: Conda install dependencies
21-
shell: bash -l {0}
22-
run: conda install --yes -c conda-forge pythonocc-core numpy scipy matplotlib vtk nose setuptools coveralls sphinx_rtd_theme sphinx python=3.10
23-
24-
- name: Conda info
25-
shell: bash -l {0}
26-
run: conda info
23+
- name: Install Dependencies (conda and pip)
24+
shell: bash
25+
run: |
26+
conda install --yes -c conda-forge pythonocc-core
27+
python -m pip install --upgrade pip
28+
python -m pip install .[doc]
2729
2830
- name: Build Documentation
29-
shell: bash -l {0}
30-
run: cd docs && sphinx-build -b html -d build/doctrees --keep-going --no-color -w '/tmp/sphinx-log' source build/html
31-
32-
#- name: Create the new documentation
33-
#uses: ammaraskar/sphinx-action@master
34-
#with:
35-
#docs-folder: "docs/"
36-
#pre-build-command: "ls -l /usr/share"
37-
#build-command: "sphinx-build -b html -d build/doctrees --keep-going --no-color -w '/tmp/sphinx-log' source build/html"
38-
31+
run: |
32+
make html
33+
working-directory: docs/
3934

4035
- name: Deploy
4136
uses: peaceiris/actions-gh-pages@v3
4237
with:
4338
github_token: ${{ secrets.GITHUB_TOKEN }}
44-
#deploy_key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
4539
publish_dir: ./docs/build/html
4640
allow_empty_commit: true
47-
48-
release_github:
41+
42+
#############################################################################
43+
## Create a public "Release" on the Github page #############################
44+
release_github: #############################################################
4945
runs-on: ubuntu-latest
5046
permissions:
5147
contents: write
5248
steps:
5349
- uses: actions/checkout@v4
5450
- uses: ncipollo/release-action@v1
5551
with:
56-
token: ${{ secrets.GITHUB_TOKEN }}
52+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)