Skip to content

api-keep-alive

api-keep-alive #9214

Workflow file for this run

# 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}"