mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-13 22:55:51 +00:00
Cache book builds
This commit is contained in:
parent
39eae40f13
commit
3c0fb4389e
1 changed files with 14 additions and 4 deletions
18
.github/workflows/deploy-book-ghpages.yml
vendored
18
.github/workflows/deploy-book-ghpages.yml
vendored
|
|
@ -50,17 +50,27 @@ jobs:
|
||||||
with:
|
with:
|
||||||
ref: ${{ matrix.branch }}
|
ref: ${{ matrix.branch }}
|
||||||
|
|
||||||
# Install dependencies
|
- name: Cache page build
|
||||||
- name: Set up Python 3.11
|
id: cache-html
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: "book/_build/html"
|
||||||
|
key: html-build-${{ hashFiles('book/**', 'figures/**', 'requirements.txt') }}
|
||||||
|
|
||||||
|
- if: ${{ steps.cache-html.outputs.cache-hit != 'true' }}
|
||||||
|
name: Set up Python 3.11
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.11
|
python-version: 3.11
|
||||||
|
cache: 'pip'
|
||||||
|
|
||||||
- name: Install dependencies
|
- if: ${{ steps.cache-html.outputs.cache-hit != 'true' }}
|
||||||
|
name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
- name: Build the book from branch
|
- if: ${{ steps.cache-html.outputs.cache-hit != 'true' }}
|
||||||
|
name: Preprocess & build the book from branch
|
||||||
run: |
|
run: |
|
||||||
jupyter-book build book/
|
jupyter-book build book/
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue