Skip to content

Commit 3d625bc

Browse files
committed
Update deploy docs workflow
1 parent 1a0b5c4 commit 3d625bc

File tree

1 file changed

+21
-44
lines changed

1 file changed

+21
-44
lines changed

.github/workflows/deploy_pages.yml

+21-44
Original file line numberDiff line numberDiff line change
@@ -3,65 +3,42 @@ name: GitHub pages
33
on:
44
# Trigger the workflow on push to main branch
55
push:
6-
branches:
7-
- main
8-
- update-books
6+
# branches:
7+
# - main
8+
# - update-books
99

1010
# This job installs dependencies, build the book, and pushes it to `gh-pages`
1111
jobs:
1212
build-and-deploy-book:
1313
strategy:
1414
matrix:
15-
include:
16-
- os: ubuntu-latest
17-
label: linux-64
18-
prefix: /usr/share/miniconda3/envs/oasismove
1915

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
2420

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

2827
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
5030
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
5834

59-
- name: Install dependencies
35+
- name: Install docs requirements
6036
run: |
61-
pip install -r requirements.txt
37+
python -m pip install -r requirements.txt
6238
6339
- name: Install OasisMove
64-
run: python3 -m pip install .[test]
40+
run: |
41+
python -m pip install '.[test]'
6542
6643
# https://github.com/executablebooks/jupyter-book/issues/1997
6744
- name: Downgrade docutils to fix layout-bug
@@ -70,7 +47,7 @@ jobs:
7047
# Build the book
7148
- name: Build the book
7249
run: |
73-
jupyter book build docs
50+
jupyter-book build docs
7451
7552
# Deploy the book's HTML to gh-pages branch
7653
- name: GitHub Pages action

0 commit comments

Comments
 (0)