# Auto trigger deploys on Netlify

> Learn how to auto-trigger daily Netlify deploys for scheduled Hugo posts by hitting a build hook webhook on a timer with IFTTT, so posts publish on their own.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2018-04-01 | Updated: 2022-04-20 | Topics: [Services](https://flaviocopes.com/tags/services/) | Canonical: https://flaviocopes.com/netlify-auto-deploy/

> Note: this does not just work on Netlify but also works for other providers that offer webhooks for manual deploys.

I have a list of scheduled posts that I want to publish every week on my blog, and I try to stay a few days ahead of that queue to have room for when I'm unable to write, or if I want to take a break.

![Blog Posts Schedule](https://flaviocopes.com/images/netlify-auto-deploy/schedule.png)

I find consistency is very important to keep the momentum going for my work. Since two months I post every day from Monday to Saturday, and I want to do so in the future as well, as I really like doing it.

I use the [Hugo Static Site Generator](https://gohugo.io/), hosted on [Netlify](https://flaviocopes.com/netlify/).

It's an amazing combination of tools, and I'm very happy with the blog setup.

Today I was out hiking on a mountain when I realized I got past my usual posting time, and I didn't publish the blog post I already scheduled.

With Hugo I can set a post date in the future, and when the site is rebuilt using the `hugo` CLI command, that post is not included in the resulting HTML, as it's a future post.

Netlify has this nice concept of building the Hugo site on their servers, so what I need to do is just trigger a new deploy. Usually deploys happen when I push something to [GitHub](https://flaviocopes.com/github/) - Netlify is alerted automatically and deploys in a minute or less.

In this case I needed to manually trigger a deploy on Netlify so I logged in using my iPhone, and clicked "Trigger deploy".

![Trigger Netlify deploy](https://flaviocopes.com/images/netlify-auto-deploy/trigger-deploy.png)

This action rebuilt the static site using Hugo, on the server side, and I just put my phone back in the pocket.

The blog post launched 🎉 and I just tweeted about it.

As I was walking, I realized I can automate all this stuff.

I just need to trigger a deploy automatically every day at 9AM, somehow. So I looked on the Netlify interface if they had any kind of automated timer for recurring deploys. There is no such feature, however they have a WebHook endpoint.

So I looked for something that I can configure to POST to the WebHook every day.

I used Zapier (works too) but then switched to [IFTTT](https://ifttt.com) which allows me to do the same thing, but for free.

On Netlify I created a WebHook URL

![Create a build hook](https://flaviocopes.com/images/netlify-auto-deploy/create-build-hook.png)

which gave me a custom URL to call:

![Webhook custom URL](https://flaviocopes.com/images/netlify-auto-deploy/build-hook-created.png)

I created an "applet" on ITFFF that fires at 8AM every day:

![IFTTT interface showing daily time trigger setup with 08 AM and 00 Minutes selected](https://flaviocopes.com/images/netlify-auto-deploy/Screen_Shot_2022-04-20_at_15.16.12.png)

And makes a web request to the deploy hook on Netlify.

![IFTTT applet workflow showing If trigger connected to Then Make a web request action](https://flaviocopes.com/images/netlify-auto-deploy/Screen_Shot_2022-04-20_at_15.18.45.png)

![Deploy a manual test](https://flaviocopes.com/images/netlify-auto-deploy/hook-deploy-working.png)

I just have to create content, push it to GitHub with the scheduled date, and don't worry about manually deploying any more! 🎉 👨🏼‍💻
