Trigger API Calls #36818
This file contains hidden or 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 twice a day around 6am and 6pm Pacific Time (~14:00 and 01:00 UTC) | |
| - cron: '0 14 * * *' | |
| - cron: '0 1 * * *' | |
| 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"' |