Skip to content

Commit 337df4d

Browse files
authored
Merge pull request #33 from KVSlab/fix-doc
Update documentation workflow
2 parents 1a0b5c4 + be574d7 commit 337df4d

File tree

2 files changed

+19
-42
lines changed

2 files changed

+19
-42
lines changed

.github/workflows/deploy_pages.yml

+18-42
Original file line numberDiff line numberDiff line change
@@ -5,63 +5,39 @@ on:
55
push:
66
branches:
77
- main
8-
- update-books
98

109
# This job installs dependencies, build the book, and pushes it to `gh-pages`
1110
jobs:
1211
build-and-deploy-book:
1312
strategy:
1413
matrix:
15-
include:
16-
- os: ubuntu-latest
17-
label: linux-64
18-
prefix: /usr/share/miniconda3/envs/oasismove
1914

20-
# https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
21-
defaults:
22-
run:
23-
shell: bash -l {0}
15+
include:
16+
- os: macos-13
17+
label: osx-64
18+
prefix: /Users/runner/miniconda3/envs/oasismove-env
2419

25-
name: Build OasisMove documentation ${{ matrix.label }}
20+
name: Build OasisMove documentation ${{ matrix.os }}
2621
runs-on: ${{ matrix.os }}
22+
defaults:
23+
run: # https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
24+
shell: bash -el {0}
2725

2826
steps:
29-
- name: Checkout
30-
uses: actions/checkout@v3
31-
32-
- name: Upgrade pip and setuptools
33-
run: |
34-
python3 -m pip install pip setuptools --upgrade
35-
36-
# See: https://github.com/marketplace/actions/setup-miniconda
37-
- name: Setup Mambaforge
38-
uses: conda-incubator/setup-miniconda@v2
39-
with:
40-
miniforge-variant: Mambaforge
41-
miniforge-version: latest
42-
channels: conda-forge
43-
activate-environment: oasismove
44-
use-mamba: true
45-
46-
- name: Set cache date
47-
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
48-
49-
- uses: actions/cache@v2
27+
- uses: actions/checkout@v4
28+
- uses: mamba-org/setup-micromamba@v1
5029
with:
51-
path: ${{ matrix.prefix }}
52-
key: ${{ matrix.label }}-conda-${{ hashFiles('environment.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
53-
id: cache
54-
55-
- name: Update environment
56-
run: mamba env update -n oasismove -f environment.yml
57-
if: steps.cache.outputs.cache-hit != 'true'
30+
environment-file: environment.yml
31+
init-shell: bash
32+
cache-environment: true
5833

59-
- name: Install dependencies
34+
- name: Install docs requirements
6035
run: |
61-
pip install -r requirements.txt
36+
python -m pip install -r requirements.txt
6237
6338
- name: Install OasisMove
64-
run: python3 -m pip install .[test]
39+
run: |
40+
python -m pip install '.[test]'
6541
6642
# https://github.com/executablebooks/jupyter-book/issues/1997
6743
- name: Downgrade docutils to fix layout-bug
@@ -70,7 +46,7 @@ jobs:
7046
# Build the book
7147
- name: Build the book
7248
run: |
73-
jupyter book build docs
49+
jupyter-book build docs
7450
7551
# Deploy the book's HTML to gh-pages branch
7652
- name: GitHub Pages action

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ jupyter-book
22
matplotlib
33
numpy
44
ghp-import
5+
sphinx==5.3.0

0 commit comments

Comments
 (0)