diff --git a/.github/workflows/keep-alive.yml b/.github/workflows/keep-alive.yml new file mode 100644 index 0000000..9262bf6 --- /dev/null +++ b/.github/workflows/keep-alive.yml @@ -0,0 +1,51 @@ + + + +# 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: Supa-keep-alive + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + schedule: + - cron: '*/10 0 * * *' # Runs every day at midnight + + + +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}" + + + + + + + + +