From deaf419c138c1b6cf77600bce2a32c3e58699d0a Mon Sep 17 00:00:00 2001 From: John Tian <85849926+snugpenguin968@users.noreply.github.com> Date: Fri, 26 Dec 2025 23:59:18 -0600 Subject: [PATCH] Create keep-alive.yaml --- .github/workflows/keep-alive.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/keep-alive.yaml diff --git a/.github/workflows/keep-alive.yaml b/.github/workflows/keep-alive.yaml new file mode 100644 index 0000000..b6f9dd2 --- /dev/null +++ b/.github/workflows/keep-alive.yaml @@ -0,0 +1,25 @@ +name: Keep Supabase Alive + +on: + schedule: + # Use an "odd" time like 05:23 to avoid the "midnight rush" on GitHub's servers + - cron: '23 5 */5 * *' + workflow_dispatch: + +jobs: + ping: + runs-on: ubuntu-latest + steps: + - name: Ping Supabase API + run: | + STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X GET "${{ secrets.SUPABASE_URL }}/rest/v1/" \ + -H "apikey: ${{ secrets.SUPABASE_ANON_KEY }}" \ + -H "Authorization: Bearer ${{ secrets.SUPABASE_ANON_KEY }}") + + echo "Supabase responded with status: $STATUS" + if [ "$STATUS" -eq 200 ]; then + exit 0 + else + echo "Warning: Received status $STATUS" + exit 1 + fi