Skip to content

Ping Supabase

Ping Supabase #165

Workflow file for this run

# Make a request to Supabase every day to prevent the project from pausing
name: Ping Supabase
on:
schedule:
- cron: '0 0 * * *' # Run at midnight every day
workflow_dispatch:
jobs:
ping:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run fetch request (develop)
run: |
curl -X POST \
--url '${{ secrets.SUPABASE_URL }}/auth/v1/token?grant_type=password' \
-H "apikey: ${{ secrets.SUPABASE_KEY }}" \
-H "Content-Type: application/json" \
-d '{
"email": "${{ secrets.SUPABASE_TEST_EMAIL }}",
"password": "${{ secrets.SUPABASE_TEST_PASSWORD }}"
}'
- name: Run fetch request (production)
run: |
curl -X POST \
--url '${{ secrets.SUPABASE_URL_PROD }}/auth/v1/token?grant_type=password' \
-H "apikey: ${{ secrets.SUPABASE_KEY_PROD }}" \
-H "Content-Type: application/json" \
-d '{
"email": "${{ secrets.SUPABASE_TEST_EMAIL }}",
"password": "${{ secrets.SUPABASE_TEST_PASSWORD }}"
}'