Skip to content

Commit 803400b

Browse files
authored
Merge pull request #25771 from sftim/20201222_publish_site_automatically
Add automatic site deploys
2 parents c7f5615 + f5dc913 commit 803400b

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)