Skip to content

Commit ba87570

Browse files
committed
add workflow to build docs
1 parent 28a5bd7 commit ba87570

File tree

3 files changed

+34
-6
lines changed

3 files changed

+34
-6
lines changed

.github/workflows/docs.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Docs
2+
3+
on: [push, pull_request]
4+
5+
6+
defaults:
7+
run:
8+
shell: bash -l {0}
9+
jobs:
10+
build:
11+
runs-on: ubuntu-20.04
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Setup conda
15+
uses: conda-incubator/setup-miniconda@v2
16+
with:
17+
activate-environment: ipympl-dev
18+
environment-file: dev-environment.yml
19+
python-version: ${{ matrix.python-version }}
20+
mamba-version: "*"
21+
auto-activate-base: false
22+
channels: conda-forge
23+
- name: Install
24+
run: python -m pip install -v .[docs]
25+
- name: Build
26+
run: make -C docs html
27+
- name: Publish
28+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
29+
uses: peaceiris/actions-gh-pages@v3
30+
with:
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
publish_dir: ./docs/_build/html
33+
force_orphan: true

docs/conf.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,11 @@
3434
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3535
# ones.
3636
extensions = [
37-
"jupyter_sphinx",
3837
"myst_nb",
3938
"sphinx.ext.intersphinx",
4039
"sphinx.ext.linkcode",
4140
"sphinx.ext.mathjax",
4241
"sphinx_copybutton",
43-
"sphinx_panels",
4442
"sphinx_thebe",
4543
"sphinx_togglebutton",
4644
]
@@ -59,8 +57,6 @@
5957
"python": ("https://docs.python.org/3", None),
6058
}
6159

62-
# remove panels css to get wider main content
63-
panels_add_bootstrap_css = False
6460

6561
# Settings for copybutton
6662
copybutton_prompt_is_regexp = True

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,11 @@
6666
'ipywidgets>=7.6.0,<8',
6767
'matplotlib>=2.0.0,<4',
6868
],
69-
extra_requires={
69+
extras_require={
7070
"docs": [
7171
"myst-nb",
7272
"Sphinx >= 1.5",
7373
"sphinx-copybutton",
74-
"sphinx-panels",
7574
"sphinx-thebe",
7675
"sphinx-togglebutton",
7776
"sphinx-book-theme",

0 commit comments

Comments
 (0)