Bump peaceiris/actions-gh-pages from 3.9.3 to 4.0.0 #84
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-book | |
on: | |
pull_request: | |
env: | |
CACHE_NUMBER: 0 # increase to reset cache manually | |
jobs: | |
build-and-upload: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Mambaforge | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
activate-environment: book-render | |
use-mamba: true | |
- name: Set cache date | |
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
with: | |
path: /usr/share/miniconda3/envs/book-render | |
key: linux-64-conda-${{ hashFiles('render-environment.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }} | |
id: cache | |
- name: Update environment | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: mamba env update -n book-render -f render-environment.yml | |
- name: Build the book | |
run: | | |
jupyter-book build . | |
- name: Zip the book | |
run: | | |
set -x | |
set -e | |
if [ -f book.zip ]; then | |
rm -rf book.zip | |
fi | |
zip -r book.zip _build/html | |
- name: Upload zipped book artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: book-zip-${{github.event.number}} | |
path: ./book.zip |