Skip to content

Commit

Permalink
ci: use jupyter cache in docs ci builds to speed up docs builds (#10128)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored Sep 14, 2024
1 parent 4980af8 commit 45cf899
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/docs-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ jobs:
done
} | tee /tmp/comment
- name: restore cache of the previously rendered notebooks
uses: actions/cache/restore@v4
with:
key: docs-${{ github.event.pull_request.base.sha }}
path: docs/**/.jupyter_cache

- name: build docs
run: nix develop --ignore-environment --keep HOME -c just docs-build-all

Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/ibis-docs-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- name: restore cache of the previously rendered notebooks
uses: actions/cache/restore@v4
with:
# https://docs.github.com/en/webhooks/webhook-events-and-payloads#push
# > The SHA of the most recent commit on ref before the push.
key: docs-${{ github.event.push.before }}
path: docs/**/.jupyter_cache

- name: run doctests
# keep HOME because duckdb (which we use for doctests) wants to use
# that for extensions
Expand All @@ -45,6 +53,12 @@ jobs:
- name: build docs
run: nix develop --ignore-environment --keep HOME -c just docs-render

- name: cache rendered notebooks
uses: actions/cache/save@v4
with:
key: docs-${{ github.sha }}
path: docs/**/.jupyter_cache

- name: build jupyterlite
run: nix develop --ignore-environment --keep HOME -c just build-jupyterlite

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ibis-docs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ jobs:
- name: checkout
uses: actions/checkout@v4

- name: restore cache of the previously rendered notebooks
uses: actions/cache/restore@v4
with:
key: docs-${{ github.event.pull_request.base.sha }}
path: docs/**/.jupyter_cache

- name: run doctest
# keep HOME because duckdb (which we use for doctests) wants to use
# that for extensions
Expand Down

0 comments on commit 45cf899

Please sign in to comment.