Commit b52770a
fix(ci): cache data/examples.json with examples/ + correct hash key
Two related bugs found in the first matrix-parallel run:
1. `make components` (build/make.py) writes to data/examples.json, not
into examples/. My cache path was only `examples`, so on cache hit
data/examples.json was missing — Hugo failed in the jupyter-example
shortcode with:
ERROR jupyter-example: Example 'landing' not found for language
'Python' in examples.json. Run 'python3 build/local_examples.py'
to generate data.
2. Cache key used data/components_local/index.json, but `make components`
(without --stack flag) reads the default data/components/index.json.
Wrong file would have meant the cache never invalidated when the
component stack changed.
Fix: include both paths in cache and key off the correct stack file:
path: |
examples
data/examples.json
key: components-${{ runner.os }}-${{ hashFiles('Makefile', 'build/**', 'data/components/index.json') }}
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e333b83 commit b52770a
1 file changed
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
256 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
257 | 259 | | |
258 | 260 | | |
259 | 261 | | |
| |||
410 | 412 | | |
411 | 413 | | |
412 | 414 | | |
413 | | - | |
| 415 | + | |
414 | 416 | | |
415 | 417 | | |
416 | 418 | | |
417 | | - | |
418 | | - | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
419 | 423 | | |
420 | 424 | | |
421 | 425 | | |
| |||
0 commit comments