Keep Supabase Alive #48
This file contains hidden or 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
| name: Keep Supabase Alive | |
| on: | |
| schedule: | |
| # Runs every 5 days at 3:00 AM UTC | |
| - cron: '0 3 */5 * *' | |
| workflow_dispatch: # Allows manual trigger from GitHub Actions tab | |
| jobs: | |
| ping-supabase: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Ping Supabase Database | |
| env: | |
| SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL }} | |
| SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }} | |
| run: | | |
| # Simple query to keep the database active | |
| curl -X POST \ | |
| "${SUPABASE_URL}/rest/v1/rpc/ping" \ | |
| -H "apikey: ${SUPABASE_ANON_KEY}" \ | |
| -H "Authorization: Bearer ${SUPABASE_ANON_KEY}" \ | |
| -H "Content-Type: application/json" \ | |
| --fail-with-body || echo "Ping completed (function may not exist, but connection made)" | |
| echo "✅ Supabase pinged successfully at $(date)" |