Add automatic build triggering

Use GitHub Actions to trigger a Netlify deploy for the primary branch,
twice per day.
pull/25771/head
Tim Bannister 2020-12-22 23:38:45 +00:00
parent ec80275820
commit f5dc913487
No known key found for this signature in database
GPG Key ID: 1E76582C4F66FA48
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
---
name: Scheduled Netlify site build
on:
schedule: # Build twice daily: shortly after midnight and noon (UTC)
# Offset is to be nice to the build service
- cron: '4 0,12 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Trigger build on Netlify
env:
TOKEN: ${{ secrets.NETLIFY_BUILD_HOOK_KEY }}
run: >-
curl -s -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d "{}" "https://api.netlify.com/build_hooks/${TOKEN}"