Joshua's Docs - Netlify
Light

Using Build Caching

Documentation is kind of sparse, but there is source code you can checkout to get an idea for how this is supposed to work:

Scheduling Builds

Although you cannot yet set builds to run automatically on a schedule, it does not take many steps to setup a Github action that triggers a Netlify build on a CRON schedule.

This forum answer summarizes an approach to doing this, but I would add a caveat that you should probably store your webhook URL as a Github secret instead of hardcoding it into the action yml, especially if your repo is public. Otherwise, anyone could see and grab your webhook URL, and spam POST requests to it to trigger tons of builds and run up your Netlify minutes / bill.

To use the webhook as a secret, just add it under the repo settings as NETLIFY_BUILD_WEBHOOK, and then change the run command to run: curl -X POST -d {} ${{ secrets.NETLIFY_BUILD_WEBHOOK }}.

Markdown Source Last Updated:
Mon Feb 08 2021 22:54:19 GMT+0000 (Coordinated Universal Time)
Markdown Source Created:
Wed Feb 03 2021 17:32:38 GMT+0000 (Coordinated Universal Time)
© 2024 Joshua Tzucker, Built with Gatsby
Feedback