Open sebffischer opened 1 year ago
Why do we render with --cache-refresh
on GitHub?
I know that option came up when we tried debugging people's issues with local rendering, where it made sense to occasionally throw out the cache. On GitHub, I don't see what the benefit would be, as we explicitly cache things that need caching and any other caching mechanism outside of the GHA cache does not have an effect anyway, right?
Yeah, I also though about this, at least we should run everything with --no-cache
instead of --cache-refresh
if we don't use the cache anyway
Wouldn't that mean that the second rendering wouldn't benefit from the first one, so the code would still run twice per workflow?
Yes, I think we should probably just enable caching. Currently we are not only not caching, we are creating a cache that we then throw away, which is like the worst thing we can do :D
I'm wary of adding the quarto cache to the GHA cache and restore that - we'd surely get faster renders which would be nice, but I can already smell the accidentally-looking-at-old-version-of-things-that-were-cached-but-maybe-should-have-been-refreshed issues brewing 🥴
Or similarly, one of the myriad of potential issues that lead to use using the --cache-refresh
locally by default might kick in and break builds, I guess?
Then again, there's a lot fewer changes happening now so maybe it's just fine.
Yeah, I would not cache between workflows, but just within a workflow
Because we render with
--cache-refresh
and we render to both pdf and html, all the code from the book is run twice in each workflow. This unnecessarily slows down the rendering time and we can / should do something about this.