@@ -3,65 +3,42 @@ name: GitHub pages
3
3
on :
4
4
# Trigger the workflow on push to main branch
5
5
push :
6
- branches :
7
- - main
8
- - update-books
6
+ # branches:
7
+ # - main
8
+ # - update-books
9
9
10
10
# This job installs dependencies, build the book, and pushes it to `gh-pages`
11
11
jobs :
12
12
build-and-deploy-book :
13
13
strategy :
14
14
matrix :
15
- include :
16
- - os : ubuntu-latest
17
- label : linux-64
18
- prefix : /usr/share/miniconda3/envs/oasismove
19
15
20
- # https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
21
- defaults :
22
- run :
23
- shell : bash -l {0}
16
+ include :
17
+ - os : macos-13
18
+ label : osx-64
19
+ prefix : /Users/runner/miniconda3/envs/oasismove-env
24
20
25
- name : Build OasisMove documentation ${{ matrix.label }}
21
+ name : Build OasisMove documentation ${{ matrix.os }}
26
22
runs-on : ${{ matrix.os }}
23
+ defaults :
24
+ run : # https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
25
+ shell : bash -el {0}
27
26
28
27
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
28
+ - uses : actions/checkout@v4
29
+ - uses : mamba-org/setup-micromamba@v1
50
30
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'
31
+ environment-file : environment.yml
32
+ init-shell : bash
33
+ cache-environment : true
58
34
59
- - name : Install dependencies
35
+ - name : Install docs requirements
60
36
run : |
61
- pip install -r requirements.txt
37
+ python -m pip install -r requirements.txt
62
38
63
39
- name : Install OasisMove
64
- run : python3 -m pip install .[test]
40
+ run : |
41
+ python -m pip install '.[test]'
65
42
66
43
# https://github.com/executablebooks/jupyter-book/issues/1997
67
44
- name : Downgrade docutils to fix layout-bug
70
47
# Build the book
71
48
- name : Build the book
72
49
run : |
73
- jupyter book build docs
50
+ jupyter- book build docs
74
51
75
52
# Deploy the book's HTML to gh-pages branch
76
53
- name : GitHub Pages action
0 commit comments