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