Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create supabase-keep-alive.yml #25

Merged
merged 7 commits into from
May 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/keep-alive.yml
Original file line number Diff line number Diff line change
@@ -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}"









Loading