Skip to content

Commit f5dc913

Browse files
author
Tim Bannister
committed
Add automatic build triggering
Use GitHub Actions to trigger a Netlify deploy for the primary branch, twice per day.
1 parent ec80275 commit f5dc913

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: Scheduled Netlify site build
3+
on:
4+
schedule: # Build twice daily: shortly after midnight and noon (UTC)
5+
# Offset is to be nice to the build service
6+
- cron: '4 0,12 * * *'
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Trigger build on Netlify
12+
env:
13+
TOKEN: ${{ secrets.NETLIFY_BUILD_HOOK_KEY }}
14+
run: >-
15+
curl -s -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d "{}" "https://api.netlify.com/build_hooks/${TOKEN}"

0 commit comments

Comments
 (0)