Trigger Supabase Cleanup API #148
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: Trigger Supabase Cleanup API | |
| on: | |
| schedule: | |
| # Run on the 1st and 15th of each month at 2 AM UTC | |
| - cron: "0 2 1,15 * *" | |
| workflow_dispatch: # Allows manual triggering | |
| jobs: | |
| trigger_cleanup: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Call Supabase Cleanup Endpoint | |
| env: | |
| # The base URL of your deployed backend on Vercel | |
| VERCEL_BACKEND_URL: ${{ secrets.VERCEL_BACKEND_URL }} | |
| run: | | |
| if [ -z "$VERCEL_BACKEND_URL" ]; then | |
| echo "Error: VERCEL_BACKEND_URL secret is not set." | |
| exit 1 | |
| fi | |
| echo "Triggering Supabase cleanup at $VERCEL_BACKEND_URL/api/clean-supabase/trigger" | |
| curl -X GET "$VERCEL_BACKEND_URL/api/clean-supabase/trigger" |