DEV Community

loading...
Cover image for Automate Netlify deployments with Zapier

Automate Netlify deployments with Zapier

dailydevtips1 profile image Chris Bongers Originally published at daily-dev-tips.com ・3 min read

One of my goals for the new version is that I'll be able to auto-deploy my website.

I love to go remote camping, which means no internet for 3 days, it's amazing don't get me wrong.
But I still want to be able to deploy my website and send out my emails and perhaps even tweet about it.

The first part to me is the most important one, getting the site redeployed.

As you may know, my site is built on Eleventy and hosted on Netlify, which works great.

Eleventy allows me to post an article with future dates, those will only be rendered on the day they should be active. So literally all we need to do is trigger a redeploy.

Netlify redeploy

This button is literally all that needs to be pressed.

Zapier auto-deploy Netlify

Luckily for us Zapier the amazing automation collection tool has a Netlify integration!

We can use Zapier to trigger a deployment on set times.

Head over to the Zapier website and signup for a free account.

Once you created the account, you'll be brought to your dashboard where we can create a new Zap.

Create zap in zapier

We will need a scheduled event to trigger the Netlify deployment.
So pick the Schedule button or search for the Zapier Schedule event.

Zapier schedule event

I want this schedule to trigger every day, so in the next selection pick every day.

Zapier schedule options

You can then state if it should run on weekends, and what time you want the trigger to run.
I post even in the weekends, so yes, and want it auto deployed every morning at 07:00 SAST.

Zapier time trigger

For the action, we search for Netlify.

Zapier Netlify app

There is only one action and that is Start Deploy.

Netlify Zapier start deploy

On the next screen, you are asked to sign in to your Netlify account.

Zapier sign in to Netlify

After connecting you can choose for which site your action should run.

Netlify choose auto-deploy site

We can then test our actions.

If we head over to our Netlify deploy section we should see the deployment.

Zapier - Netlify auto-deployment on time

It worked, we now auto-trigger a Netlify deploy using a Zapier scheduled time hook.

Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on Facebook or Twitter

Discussion (6)

pic
Editor guide
Collapse
madza profile image
Madza

a good service, tried it a long time ago... 😉
tho, quickly found their free plan to be too tight, at least to my needs... 😀😀

Collapse
dailydevtips1 profile image
Chris Bongers Author

Yeah can imagine, another one would be IFTTT but then you would have to write the webhook manually.
For now Zapier free is good enough but also testing IFTTT for another thing on the side

Collapse
waylonwalker profile image
Waylon Walker

I'm a sucker for automation.

Any plans to automate distribution to DEV and hashnode?

Collapse
dailydevtips1 profile image
Chris Bongers Author

Thanks Waylon, took some time this morning to move over to GitHub actions + schedules via that.

Indeed next step is looking in Dev and Hashnode.

Collapse
alexsunny123 profile image
Collapse
dailydevtips1 profile image
Chris Bongers Author

You're welcome, glad you like the article ✌️