From f5dc913487694b0cfdc53ffb02b847cfcfcc9e0e Mon Sep 17 00:00:00 2001 From: Tim Bannister Date: Tue, 22 Dec 2020 23:38:45 +0000 Subject: [PATCH] Add automatic build triggering Use GitHub Actions to trigger a Netlify deploy for the primary branch, twice per day. --- .github/workflows/netlify-periodic-build.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/netlify-periodic-build.yml diff --git a/.github/workflows/netlify-periodic-build.yml b/.github/workflows/netlify-periodic-build.yml new file mode 100644 index 0000000000000..29fef807b6c0d --- /dev/null +++ b/.github/workflows/netlify-periodic-build.yml @@ -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}"