@@ -304,7 +304,14 @@ jobs:
304304 # Keep the historical root path so caches produced by the previous
305305 # monolithic workflow remain restorable. The vignette itself writes
306306 # only to its Multi-Omic_Mouse_Brain subdirectory.
307- path : vignettes/.knitr-cache
307+ #
308+ # knitr caches R objects but not the figures a chunk drew. A cached
309+ # chunk therefore replays its <img> tag without rewriting the PNG, and
310+ # pkgdown aborts on the dangling reference. Carry the rendered figures
311+ # alongside the chunk cache so the two always agree.
312+ path : |
313+ vignettes/.knitr-cache
314+ docs/articles/${{ matrix.article }}_files/figure-html
308315 key : pkgdown-knitr-${{ runner.os }}-${{ matrix.article }}-${{ hashFiles('DESCRIPTION', 'NAMESPACE', 'R/**/*.R') }}-${{ github.run_id }}-${{ github.run_attempt }}
309316 restore-keys : |
310317 pkgdown-knitr-${{ runner.os }}-${{ matrix.article }}-${{ hashFiles('DESCRIPTION', 'NAMESPACE', 'R/**/*.R') }}-
@@ -334,7 +341,9 @@ jobs:
334341 if : always() && steps.article-cache.outputs.cache-hit != 'true' && matrix.article == 'Multi-Omic_Mouse_Brain'
335342 uses : actions/cache/save@v4
336343 with :
337- path : vignettes/.knitr-cache
344+ path : |
345+ vignettes/.knitr-cache
346+ docs/articles/${{ matrix.article }}_files/figure-html
338347 key : pkgdown-knitr-${{ runner.os }}-${{ matrix.article }}-${{ hashFiles('DESCRIPTION', 'NAMESPACE', 'R/**/*.R') }}-${{ github.run_id }}-${{ github.run_attempt }}
339348
340349 - name : Save rendered article
0 commit comments