Scheduled Netlify site build #115
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 * * *' | |
permissions: {} # none | |
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}" |