-
Notifications
You must be signed in to change notification settings - Fork 7
53 lines (45 loc) · 1.54 KB
/
deploy-book.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Build IGA-Python Jupyter Book
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
deploy-book:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: |
requirements.txt
- name: Install non-Python dependencies on Ubuntu
if: matrix.os == 'ubuntu-latest'
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: gfortran openmpi-bin libopenmpi-dev libhdf5-openmpi-dev
version: 1.0
execute_install_scripts: true
# When loading cached apt packages, the default MPI compiler isn't set.
# Workaround is to 'reinstall' openmpi-bin, which doesn't actually perform
# installation (since openmpi-bin already exists), but instead reruns
# `update-alternatives` which fixes the symlinks to mpicc/mpif90.
- name: Set default MPI and HDF5 C compilers on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install --reinstall openmpi-bin libhdf5-openmpi-dev
- name: Install Jupyter Book and Psydac
run: |
pip3 install --upgrade pip
pip3 install -r requirements.txt
- name: Build Jupyter Book
run: jupyter-book build .
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/master'
run: ghp-import -n -p -f _build/html
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}