Skip to content

Commit 0985134

Browse files
committed
New docs action
1 parent 6ecd0fb commit 0985134

File tree

4 files changed

+50
-16
lines changed

4 files changed

+50
-16
lines changed

.github/workflows/build_docs.yml

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,30 @@ on:
77
- cy/docs-action
88

99
jobs:
10-
build:
11-
10+
sphinx_docs_to_gh-pages:
1211
runs-on: ubuntu-latest
13-
12+
name: Sphinx docs to gh-pages
1413
steps:
15-
- run: sudo apt-get update && sudo apt-get install libgl1
16-
- uses: actions/checkout@v1
17-
# Standard drop-in approach that should work for most people.
18-
- uses: ammaraskar/sphinx-action@master
19-
with:
20-
pre-build-command: "pip install --upgrade pip \ pip install -r requirements.txt napari-cellseg3d opencv-python-headless"
21-
docs-folder: "docs/"
22-
23-
- name: GitHub Pages action
24-
uses: peaceiris/[email protected]
25-
with:
26-
github_token: ${{ secrets.GITHUB_TOKEN }}
27-
publish_dir: ./docs/_build/html
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
- name: Make conda environment
18+
uses: conda-incubator/setup-miniconda@v2
19+
with:
20+
python-version: 3.9 # Python version to build the html sphinx documentation
21+
environment-file: devtools/conda-envs/docs_env.yaml # Path to the documentation conda environment
22+
auto-update-conda: false
23+
auto-activate-base: false
24+
show-channel-urls: true
25+
- name: Installing the library
26+
shell: bash -l {0}
27+
run: |
28+
python setup.py install
29+
- name: Running the Sphinx to gh-pages Action
30+
uses: uibcdf/[email protected]
31+
with:
32+
branch: main
33+
dir_docs: docs
34+
sphinxapiopts: '--separate -o . ../'
35+
sphinxapiexclude: '../*setup* ../*.ipynb'
36+
sphinxopts: ''

devtools/__init__.py

Whitespace-only changes.

devtools/conda-envs/__init__.py

Whitespace-only changes.

devtools/conda-envs/docs_env.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: docs-env
2+
dependencies:
3+
- black
4+
- coverage
5+
- isort
6+
- pytest
7+
- pytest
8+
- pytest-qt
9+
- sphinx
10+
- sphinx-autodoc-typehints
11+
- sphinx-rtd-theme
12+
- tox
13+
- twine
14+
- numpy
15+
- napari[all]>=0.4.14
16+
- QtPy
17+
- opencv-python>=4.5.5
18+
- dask-image>=0.6.0
19+
- matplotlib>=3.4.1
20+
- tifffile>=2022.2.9
21+
- imageio-ffmpeg>=0.4.5
22+
- torch>=1.11
23+
- monai[nibabel,scikit-image,itk,einops]>=0.9.0
24+
- pillow
25+
- vispy>=0.9.6

0 commit comments

Comments
 (0)