Skip to content

Instantly share code, notes, and snippets.

@alex-streza
Created December 8, 2022 08:54
Show Gist options
  • Save alex-streza/09135ae702a8a449578da2b80188fd40 to your computer and use it in GitHub Desktop.
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
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