Where or how can I access the publish directory of a previous build, my app checks if a file is present in the generated directory before building it again, for example:
A static website generator want's to compile sass from the source directory
Before building it looks for the generated css file in the publish directory
If the file is present in the publish directory it checks if it's newer than the source file
If the source file is newer than the published css file the static website generator compiles the sass and overwrites the previous css file
Else it keeps the previous file and the sass file doesn't need to be compiled
Precious build minutes saved!
I could use a cache system, writing the generated css to '/opt/build/cache' and compare/copy that file to the publish directory when building the site, but that seems a bit unnecessary knowing the files where already generated on a previous build...
Another solution I used in the past is writing the files back to github after build (with [skip ci] in the commit message) but that feels a little dirty...
Additional comments for Netlify
A strange thing, when checking my publish directory before building ;1 folder (of many) is still present?
Hey there! If you still require help, can I ask that you visit Netlify Community and share your question there? You may wish to search and see if this has been asked before!
About me
My question in a little more detail
Where or how can I access the publish directory of a previous build, my app checks if a file is present in the generated directory before building it again, for example:
I could use a cache system, writing the generated css to '/opt/build/cache' and compare/copy that file to the publish directory when building the site, but that seems a bit unnecessary knowing the files where already generated on a previous build...
Another solution I used in the past is writing the files back to github after build (with [skip ci] in the commit message) but that feels a little dirty...
Additional comments for Netlify
A strange thing, when checking my publish directory before building ;1 folder (of many) is still present?