I’m trying to migrate a Gatsby Cloud site for a small charity ahead of sunsetting, but I think I’m finding the preview functionality missing in Netlify hosting (or I can’t find it).
The migration guide omits how to migrate the preview config.
In Gatsby Cloud, there is a separate preview context, same code branch built using cached rapid incremental builds and different environment variables so that the current preview content got pulled from contentful, and typically served at the preview URL within a few seconds.
These two attributes seem to be entirely missing on the Netlify platform. Closest I can find is this:
But it expects the code to be on different branches I can’t see a way to build the same branch with preview environment variables. Even if this worked, or I apply a fudge of having two identical named code branches using hooks to rebuild the preview branch, there seems to be no incremental build caching so every contentful node edit would take minutes of build time to appear.
Am I missing something, is there any way to restore this lost preview functionality on Netlify.
Thanks for getting in touch, and this is a great question! Gatsby Cloud Preview and Incremental Builds will not come to Netlify in their current state, however there are a few different options available for replicating this setup on Netlify.
Many users have reached out regarding the content previewing functionality in the new Stackbit integration, and while it’s an excellent option for addressing this use case, we certainly realize that it’s not the best fit for every team.
We also recommend deploy contexts to maintain granular control of where your draft content builds.
It seems like both those pointers are fairly orthogonal to the problem I have. Stackbit is a no-code environment with a whole load of baggage which is not relevant to this problem, and deploy contexts are an internal Netlify construct that allows me to specify the environments using a config file which is in the repo.
Neither of those cover the Gatsby Hosting fundamental concept of one repo [branch], multiple sites, and fast incremental builds that enable content preview. It is a shame we are being pushed off a working environment onto a feature incomplete replacement with undue haste. Is there any timeline for implementing the missing functionality on the Netlify platform?
I’ve reviewed this thread with our product team and wanted to let you know where we landed:
First off, we’re sorry to hear that Stackbit isn’t the right solution for you. Beyond being an editor (that’s no-code for business stakeholders, though asy ou mention it’s very much yes-code for devs), it allows for previews to be set up (with almost no work) with no vendor lock in and extra dependencies, which works well for many people.
The other alternative that just works is deploy previews that are native to Netlify. Their only gap compared to the Gatsby solution is their need for a build, which means they’re not instantaneous.
We think those two solutions offer great coverage for the problem, and unfortunately we do have have a sunset date for the Gatsby hosting in order to free up our resources and focus on other parts of the platform.