Trigger API Calls #23488
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: Trigger API Calls | |
on: | |
schedule: | |
# Runs every hour | |
- cron: '0 * * * *' | |
jobs: | |
build: | |
name: Trigger Production Build (clear cache) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Curl request | |
run: 'curl -XPOST -H "Accept: application/json" -H "Authorization: Bearer ${{ secrets.NETLIFY_TOKEN }}" -d "{\"clear_cache\": true}" "https://api.netlify.com/api/v1/sites/${{ secrets.NETLIFY_SITE_ID }}/builds"' |