nanoc / features

Collection of feature requests
2 stars 1 forks source link

Find a way to make partial recompiles possible in CI #57

Open Ravlen opened 3 years ago

Ravlen commented 3 years ago

This might be something that's possible now, but I haven't been able to find any details about it. We run Nanoc in CI to recompile the site and test internal links, but we'd like to avoid recompiling the whole site (all 1300'ish pages) every time. It would be nice if we could cache the compiled site, and the info in Nanoc's checksum/outdatedness/files, so that it only recompiles changed source files.

I've tried this in CI right now, by caching the whole site, as well as the Nanoc files, but it just recompiles all files every time. @ddfreyne am I just doing this wrong, or is this feature that needs to be implemented?

denisdefreyne commented 3 years ago

@Ravlen I believe this could/should already work — you’ll need to cache both tmp/nanoc/ and output/. Should work quite well on GitLab CI :)

I’ve not yet tried this myself, primarily because the sites that I work on are small enough, but also because I like the idea of rebuilding from scratch on CI anyway.

Ravlen commented 3 years ago

@ddfreyne I must be putting saving the cache in the wrong place, I'll keep tinkering with it, thanks a lot for the fast reply!