Skip to content

Commit 88ecf70

Browse files
committed
[JTH] little changes to deploy sphinx docu
1 parent b79316e commit 88ecf70

File tree

4 files changed

+27
-25
lines changed

4 files changed

+27
-25
lines changed

.github/workflows/build-docs.yml

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,32 @@ permissions:
99
contents: write
1010

1111
jobs:
12-
docs:
12+
build-and-deploy-docs:
1313
runs-on: ubuntu-latest
14-
14+
1515
steps:
16-
- uses: actions/checkout@v4
17-
18-
- uses: actions/setup-python@v5
16+
- name: Checkout Repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set Up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.12"
1923

20-
- name: Install dependencies
21-
run: |
22-
pip install sphinx sphinx-rtd-theme jupyter-sphinx
23-
24-
- name: Sphinx build
25-
run: |
26-
sphinx-apidoc -o docs/source/ bluemath_tk/
27-
sphinx-build docs/source/ docs/build/
24+
- name: Install dependencies
25+
run: |
26+
pip install bluemath-tk[docs]
2827
29-
- name: Deploy to GitHub Pages
30-
uses: peaceiris/actions-gh-pages@v3
31-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
32-
with:
33-
publish_branch: gh-pages
34-
github_token: ${{ secrets.GITHUB_TOKEN }}
35-
publish_dir: docs/build/
36-
force_orphan: true
28+
- name: Sphinx build
29+
run: |
30+
sphinx-apidoc -o docs/source/ bluemath_tk/
31+
sphinx-build docs/source/ docs/build/
32+
33+
- name: Deploy to GitHub Pages
34+
uses: peaceiris/actions-gh-pages@v3
35+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
36+
with:
37+
publish_branch: gh-pages
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
publish_dir: docs/build/
40+
force_orphan: true

.github/workflows/build-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: Publish Python Package
1+
name: Build and Publish Package
22

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

88
jobs:
9-
build-and-publish:
9+
build-and-publish-package:
1010
runs-on: ubuntu-latest
1111

1212
steps:

docs/source/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"sphinx.ext.viewcode",
1919
"sphinx.ext.napoleon",
2020
"sphinx.ext.doctest",
21-
"matplotlib.sphinxext.plot_directive",
2221
"jupyter_sphinx",
2322
]
2423

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ dependencies = [
4949
[project.optional-dependencies]
5050

5151
docs = ["sphinx", "sphinx-rtd-theme", "jupyter-sphinx"]
52-
tests = ["pytest", "pytest-mock"]
5352
deep = ["tensorflow", "keras"]
5453
num-models = ["hydromt-sfincs"]
5554

0 commit comments

Comments
 (0)