How to Schedule Recurring Deploys in Netlify
I run several sites on Netlify that require regular, scheduled builds and deploys.
I had to figure out how to automate a deploy in Netlify.
It seems as though this isn’t a built-in feature.
This is where Zapier comes in to play.
Zapier will allow us to start deploys in response to some trigger from another service.
Zapier-Netlify Integration
I found this zap, as they call it, that will start deploys of Netlify sites on a daily schedule.
After creating an account, we can use this zap to connect to our Netlify account and trigger builds.
First, we set the frequency and time of day of each build.
We then confirm that we want to integrate this zap with Netlify.
Then, we connect this zap with our Netlify account.
Finally, we select the site for which we want to trigger builds.
This is probably the simplest way of creating scheduled builds of your Netlify sites.
Custom Build Hooks
Another option that I’ve used in the past involves sending webhook POST
requests on a daily schedule.
In the Build & deploy
tab of Netlify, there’s an option to generate a unique URL to trigger builds.
If we make a POST
request to this URL, then our site will build.
Zapier simply allows us to make this request daily.
We can follow the same steps as above, and then simply paste the build URL into the POST request URL.