DEV Community

Discussion on: Schedule Netlify Builds with GitHub Actions, Cron, and Webhooks

Collapse
 
michaelcurrin profile image
Michael Currin

For interest, how to expand on the Netlify hook:

You could add workflow_dispatch under on, then you get run now kind of button. Which is similar to a button that already exists in Netlify.

If you have another service that supports looks, you could use the URL there instead of GH Actions.

E.g. maybe you build or find a service that can trigger a web hook when content changes. Like a new blog post on a blog site, a new commit in your repo which contains markdown web pages, or a new tweet is made. At the danger that high activity will cause rapid rebuilds on Netlify. If you are going to pull in fast changing data then one is better off with pulling in content on the frontend like Instagram, or a server side HTML with PHP/Python rather than static site.

Another easy trigger to setup would be with IFTT.com - you can set it up to listen to a ton of events like a tweet is created or your phone enters a certain GPS location, then cause an event like send an email or add to a Google Spreadsheet or ping any given URL. Such as the Netlify one. I mean you can even use a thermometer or motion sensor in your smart home IoT setup to trigger an event if you really want.

Collapse
 
chantastic profile image
chantastic

yeah! it's really interesting to think of the possibilities. how we might integrate it with some of our social accounts and trigger updates (say, after a stream ends) would be very cool.