For all my repos I use pre-commit both as pre-commit linting / pre-test and as a CI step to make sure contributors keep the code style consistent and have done basic checks.
Pre-commit caches in ~/.cache/pre-commit by default.
The catch is tha the main build (of the actual sites) is done using Hugo whose cache on Netlify is stored in HUGO_CACHEDIR
(which has a Netlify default).
What I am wondering is how to include both caches in my Netlify cache. At present I use the Hugo Cache Resources Plugin which takes care of the Hugo cache for me.
For a concrete example of a repo:
Netlify domain: wildtechgarden.netlify.app
which is https://www.wildtechgarden.ca and is based on
and also pulls in (via Hugo modules which are a thin wrapper about Go modules)