Skip to content

Commit e784f9d

Browse files
Merge pull request #267 from JohnGriffiths/add_ci_data_cache
added CI data fetcher cache instruction
2 parents 3f9143c + 20de105 commit e784f9d

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

.github/workflows/docs.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ permissions:
1212
jobs:
1313
build:
1414
runs-on: ubuntu-latest
15-
steps:
15+
env:
16+
WHOBPYT_DATA: $HOME/.whobpyt/data
1617

18+
steps:
1719
- name: Checkout repo
1820
uses: actions/checkout@v3
1921
with:
@@ -63,6 +65,27 @@ jobs:
6365
key: ${{ runner.os }}-sphinx-${{ hashFiles('examples/**/*.py', 'doc/**/*', 'conf.py') }}
6466
restore-keys: |
6567
${{ runner.os }}-sphinx-
68+
69+
- name: Restore cached whobpyt data
70+
id: cache-whobpyt
71+
uses: actions/cache@v4
72+
with:
73+
path: ${{ env.WHOBPYT_DATA }}
74+
key: ${{ runner.os }}-whobpyt-data-v1 # bump to v2 if you need a fresh copy
75+
restore-keys: |
76+
${{ runner.os }}-whobpyt-data-
77+
78+
- name: Fetch datasets (first run only)
79+
if: steps.cache-whobpyt.outputs.cache-hit != 'true'
80+
run: |
81+
python - <<'PY'
82+
import whobpyt
83+
from whobpyt.datasets.fetchers import fetch_egmomi2023, fetch_egmomi2025,fetch_egtmseeg, fetch_egismail2025
84+
fetch_egmomi2023()
85+
fetch_egmomi2025()
86+
fetch_egismail2025()
87+
fetch_egtmseeg()
88+
PY
6689
6790
- name: Build docs
6891
run: |

0 commit comments

Comments
 (0)