Keep a Hugging Face Space awake and post a daily screenshot to Discord.
This repository includes a GitHub Actions workflow that runs daily and:
- Opens your Hugging Face Space in a real browser via
agent-browser - Waits for expected text (
Sign in) so the page is fully rendered - Captures a screenshot (
page.png) - Posts the screenshot to Discord through a webhook
This gives both sleep prevention and visual uptime monitoring.
.github/workflows/keep-huggingface-awake.yml
Schedule:
cron: "0 0 * * *"(daily at 00:00 UTC)
Add these in Settings → Secrets and variables → Actions:
HUGGING_FACE_SPACE_URLDISCORD_WEBHOOK_URL
- The workflow also supports manual runs via workflow_dispatch.
- Update
agent-browser wait --text "Sign in"to a page text that best matches your app.