Created
December 8, 2022 08:54
-
-
Save alex-streza/09135ae702a8a449578da2b80188fd40 to your computer and use it in GitHub Desktop.
GitHub Action to register a cron job that triggers a sync event on Vercel hosted endpoint
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: 5-minute-cron | |
on: | |
schedule: | |
- cron: "*/5 * * * *" | |
jobs: | |
cron: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Call the sync API endpoint on Vercel | |
run: | | |
curl --request POST \ | |
--url 'https://<WEBSITE.VERCEL.APP>/api/sync' \ | |
-H 'Authorization: Bearer ${{ secrets.API_SECRET_KEY }}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment