Keeps Supabase free-tier projects alive by pinging them every 3 days via GitHub Actions.
Supabase pauses free-tier projects after 7 days of inactivity. This repo queries each project's database every 3 days, resetting the inactivity timer.
For each Supabase project you want to keep alive:
- Open the Supabase Dashboard
- Select your project
- Go to Settings > API
- Copy:
- Project URL (e.g.
https://abcdefgh.supabase.co) - anon / public key under "Project API keys"
- Project URL (e.g.
Using secrets-template.json as a guide, create a JSON array with one entry per project:
[
{ "name": "my-project-prod", "url": "https://abcdefgh.supabase.co", "key": "eyJ...", "table": "posts" },
{ "name": "another-project", "url": "https://qrstuvwx.supabase.co", "key": "eyJ..." }
]name— a human-readable label used only in log outputurl— Project URL from Settings > APIkey—anon(public) key from Settings > APItable(recommended) — any table readable by the anon key; triggersSELECT * FROM table LIMIT 1, which is a guaranteed database read. Without this field, the workflow falls back to hitting the API root, which may not reliably count as activity.
You can add as many projects (across as many Supabase accounts) as you like.
- In your GitHub repo, go to Settings > Secrets and variables > Actions
- Click New repository secret
- Name:
SUPABASE_PROJECTS - Value: your JSON array from step 2
- Click Add secret
If you forked this repo, GitHub disables Actions by default.
- Go to the Actions tab
- Click I understand my workflows, go ahead and enable them
Trigger a manual run to confirm everything is configured correctly:
- Go to Actions tab
- Select Keep Supabase Projects Alive
- Click Run workflow > Run workflow
- Watch the logs — each project should show
[OK]with an HTTP status
The workflow runs automatically at midnight UTC every 3 days (0 0 */3 * *).
No further action needed after setup.
Pinging: my-project-prod — querying table 'posts'
[OK] my-project-prod — HTTP 200
Pinging: another-project — hitting API root (consider adding a 'table' field for a guaranteed DB read)
[OK] another-project — HTTP 200
All projects pinged successfully.
If a project fails:
[FAIL] another-project — curl exit 22, HTTP 401
GitHub will send a failure email notification if any project fails to ping.
- Only the
anon(public) key is used — it has the same access as an anonymous browser visitor. - The secret is never printed in logs.
- No writes are made to your database.