Supabase Keep Alive #4
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: Supabase Keep Alive | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" # 매일 자정(UTC)에 실행 | |
| workflow_dispatch: # GitHub UI에서 수동 실행 가능 | |
| jobs: | |
| keep-alive: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Ping Supabase DB | |
| run: | | |
| response=$(curl -s -o /dev/null -w "%{http_code}" \ | |
| -X GET "${{ secrets.SUPABASE_URL }}/rest/v1/posts?select=id&limit=1" \ | |
| -H "apikey: ${{ secrets.SUPABASE_ANON_KEY }}" \ | |
| -H "Authorization: Bearer ${{ secrets.SUPABASE_ANON_KEY }}") | |
| echo "HTTP Status: $response" | |
| if [ "$response" -ne 200 ]; then | |
| echo "❌ Supabase ping 실패 (status: $response)" | |
| exit 1 | |
| fi | |
| echo "✅ Supabase ping 성공" |