api-keep-alive #9214
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
# every day api call to supabase, so it doesnt go in pause after 7 days.. | |
# and render every 10 mins, so it doesn't go to sleep (as it takes 50 secs for another request when in sleep) | |
name: api-keep-alive | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
schedule: | |
- cron: '*/16 8-18 * * 1-5' # Runs every 16 minutes from 08:00 to 19:55 on weekdays | |
jobs: | |
keep_alive: | |
runs-on: ubuntu-latest | |
env: | |
SUPABASE_PROJECT_REF: ${{ secrets.SUPABASE_PROJECT_REF }} | |
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }} | |
RENDER_API_CALL: ${{ secrets.RENDER_API_CALL }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: supabase/setup-cli@v1 | |
with: | |
version: latest | |
# - name: supabase | |
# run: | | |
# curl "https://${SUPABASE_PROJECT_REF}.supabase.co/rest/v1/todos" \ | |
# -H "apikey: ${SUPABASE_ANON_KEY}" \ | |
# -H "Authorization: Bearer ${SUPABASE_ANON_KEY}" | |
- name: render | |
run: | | |
curl "${RENDER_API_CALL}" | |