Automatic trigger deployment on Netlify

I have a list of scheduled posts to be published on my blog every week. This is how I use Zapier to automatically trigger the deployment of my Hugo static site on Netlify every morning

I have a scheduled list of posts that I want to publish on my blog every week, and I try to keep a few days before that queue to make room when I can’t write or want to take a break.

Blog Posts Schedule

I find that consistency is very important to maintain momentum. Since two months, I have posted every day from Monday to Saturday, and I want to do this in the future, because I really like it.

I useHugo Static Website Generator, Hosted onNetlify.

This is an amazing combination of tools and I am very satisfied with the blog setup.

Today, when I realized that I had exceeded the usual publishing time and did not publish the scheduled blog posts, I was hiking in the mountains.

Using Hugo, I can set a future release date and usehugoCLI command, the post is not included in the generated HTML because it is a future post.

Netlify has a good concept of building a Hugo site on its server, so all I need to do is trigger a new deployment. Usually, when I push something to GitHub, it will be deployed-Netlify will automatically be alerted and the deployment will be completed in a minute or less.

In this case, I need to manually trigger the deployment on Netlify, so I log in with my iPhone and click "Trigger Deployment".

Trigger Netlify deploy

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

The blog post started πŸŽ‰ and I just tweeted on Twitter.

When I walked, I realized that I could automate all these things.

I just need to automatically trigger the deployment at 9 AM in some way every day. So I checked the Netlify interface to see if they have any automatic timers for repeated deployments. There is no such feature, but they have a WebHook endpoint.

Therefore, I have been looking for content that can be configured to be posted to WebHook every day. enterZapier.

Zapier is a fully automated tool.

Googling I found oneZap sends WebHook POST requests every day, And this is exactly what I need.

Now, on Netlify, I just created a WebHook URL

Create a build hook

This gave me a custom URL to call:

Webhook custom URL

I just pasted the URL on Zapier and set it to make an empty POST request to my Netlify hook:

Schedule every day with Zapier

The manually triggered Zap deployment test worked:

Deploy a manual test

I am very happy now! I just need to create content and push it to GitHub on the scheduled date, so I don’t have to worry about deploying it! πŸŒˆπŸŽ‰πŸ‘¨πŸΌπŸ’»

More service tutorials: