Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eduardoboucas/scheduled-netlify-deploys
Trigger Netlify deploys on a schedule
https://github.com/eduardoboucas/scheduled-netlify-deploys
cron functions netlify scheduled
Last synced: 3 months ago
JSON representation
Trigger Netlify deploys on a schedule
- Host: GitHub
- URL: https://github.com/eduardoboucas/scheduled-netlify-deploys
- Owner: eduardoboucas
- Created: 2022-01-28T16:24:25.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-28T19:20:03.000Z (about 3 years ago)
- Last Synced: 2024-10-06T04:01:54.517Z (4 months ago)
- Topics: cron, functions, netlify, scheduled
- Language: TypeScript
- Homepage:
- Size: 7.81 KB
- Stars: 5
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Scheduled Netlify Deploys
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/eduardoboucas/scheduled-function-template)
You can make use of [Scheduled Functions](https://ntl.fyi/sched-func) and [Build Hooks](https://docs.netlify.com/configure-builds/build-hooks/) to automatically deploy your Netlify site on a recurring schedule.
Here's how:
1. Follow the [Scheduled Functions documentation](https://ntl.fyi/sched-func) to enable the experimental feature for your new site
2. Go to the site settings, [create a new Build hook](https://docs.netlify.com/configure-builds/build-hooks/), and copy the URL
3. Create an environment variable named `BUILD_HOOK_URL` with the URL from the previous step
4. Copy the [example function](https://github.com/eduardoboucas/scheduled-function-template/blob/main/netlify/functions/scheduled.ts) into your `netlify/functions` directory
- You can change the frequency from `@hourly` to `@daily`, `@weekly`, or any [valid cron expression](https://crontab.guru/)5. Deploy your site and wait for the builds to start showing
![]()