Skip to content

Commit aee81c2

Browse files
authored
Merge pull request #133 from MDAnalysis/fix-doc-deployment
fix doc deployment
2 parents 21032fb + 16d86d0 commit aee81c2

File tree

3 files changed

+17
-22
lines changed

3 files changed

+17
-22
lines changed

.github/workflows/docs.yaml

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
push:
44
branches:
55
- master
6+
pull_request:
7+
branches:
8+
- master
69

710
concurrency:
811
group: "${{ github.ref }}-${{ github.head_ref }}"
@@ -18,44 +21,34 @@ jobs:
1821
runs-on: ubuntu-latest
1922

2023
steps:
21-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v3
2225
with:
23-
fetch-depth: 0
24-
26+
fetch-depth: 0
27+
2528
- name: setup_miniconda
2629
uses: conda-incubator/setup-miniconda@v2
2730
with:
28-
python-version: 3.9
31+
python-version: 3.11
32+
environment-file: ci/environment.yaml
2933
auto-update-conda: true
3034
channel-priority: flexible
3135
channels: conda-forge
32-
add-pip-as-python-dependency: true
33-
mamba-version: "*"
34-
35-
- name: install package deps
36-
run: |
37-
mamba install numpy scipy pytest pytest-cov codecov sphinx
38-
pip install sphinx-sitemap sphinx-rtd-theme
39-
40-
- name: check install
41-
run: |
42-
which python
43-
which pip
44-
conda info
45-
conda list
46-
36+
miniforge-variant: Mambaforge
37+
use-mamba: true
38+
4739
- name: install package
4840
run: |
4941
pip install -v .
5042
5143
- name: build docs
5244
run: |
53-
python setup.py build_sphinx
45+
cd doc && sphinx-build -b html source build
5446
5547
- name: deploy docs
5648
uses: peaceiris/actions-gh-pages@v3
49+
if: github.event_name != 'pull_request'
5750
with:
5851
github_token: ${{ secrets.GITHUB_TOKEN }}
59-
publish_dir: ./build/sphinx/html
52+
publish_dir: ./doc/build
6053
user_name: 'github-actions'
6154
user_email: '[email protected]'

ci/environment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ dependencies:
1010
# documentation
1111
- mdanalysis-sphinx-theme >=1.0.1
1212
- pip:
13-
- sphinx_sitemap
13+
- sphinx-sitemap

ci/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
numpy
22
scipy
3+
mrcfile
4+
mdanalysis-sphinx-theme >=1.0.1
35
sphinx-sitemap

0 commit comments

Comments
 (0)