I have a Contentful CMS site and we are running about 18 minutes for a push to production. To me this seems pretty inefficient. When I work with Wordpress it is a 1-1 ratio of make a change to a page and publish THAT SINGLE PAGE to production, not the entire site.
How can I reduce the time to publish general page updates or new pages to site?
Can I remove pages like those set to draft status which often cause deployment errors anyway?
PLEASE help us help you by writing a good post!
we need to know your netlify site name. Example: gifted-antelope-58b104.netlify.app
DNS issues? Tell us the custom domain, tell us the error message! We can’t help if we don’t know your domain.
Build problems? Link or paste the FULL build log & build settings screenshot
From what I know, and I might be wrong about this, static website generators always build from start (with Gatsby being the exception as I guess it has a feature called incremental builds, however not all can use it). So, it’s always going to rebuild the entire thing.
After the build is complete, Netlify compares the hashes of all the files to publish and then updates only the files with new hashes. But for Netlify to be able to do that, a full build is necessary.
I’d recommend you to try and reduce your build time or get your build timeout increased to 30 mins.
You probably can. If you are trying to process images or if there are just too many files to build, that might make a difference. There also might be some dependencies taking up a lot of time compiling the code. Switching the framework is also an option, however that would be too much work.
I’d echo @hrishikesh and say that you are looking for ISR! We currently have a Build Plugin to support the analogous thing in Gatsby (“incremental builds”), but we do not fully support Next.js ISR yet. You can see that the feature is currently a high priority for us:
I’d encourage you to follow that issue for when it ships.