Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
YouTube Security VideosAndroid Police: Samsung is smashing records! #shorts #tech #phones(21.09.2026 um 13:55 Uhr)
YouTube Security Videosheise & c't: Bundesnetzagentur wollte diesen Futterautomaten verbieten(21.09.2026 um 13:53 Uhr)
YouTube Security VideosNeil Patel: Your Google Traffic Isn't An Asset It's A Loan #shorts(21.09.2026 um 14:05 Uhr)
Windows Tipps & SecurityF-14 A Tomcat Top Gun endlich als Revell Klemmbausteinmodell erhältlich(21.09.2026 um 14:27 Uhr)
Sichere ProgrammierungShow the Hand-Back Sample Before Approving an Agent Score(21.09.2026 um 14:15 Uhr)
Sichere ProgrammierungHybrid retrieval in one Postgres query: RRF over tsvector + pgvector(21.09.2026 um 14:15 Uhr)
YouTube Security VideosAndroid Police: Samsung is smashing records! #shorts #tech #phones(21.09.2026 um 13:55 Uhr)
YouTube Security Videosheise & c't: Bundesnetzagentur wollte diesen Futterautomaten verbieten(21.09.2026 um 13:53 Uhr)
YouTube Security VideosNeil Patel: Your Google Traffic Isn't An Asset It's A Loan #shorts(21.09.2026 um 14:05 Uhr)
Windows Tipps & SecurityF-14 A Tomcat Top Gun endlich als Revell Klemmbausteinmodell erhältlich(21.09.2026 um 14:27 Uhr)
Sichere ProgrammierungShow the Hand-Back Sample Before Approving an Agent Score(21.09.2026 um 14:15 Uhr)
Sichere ProgrammierungHybrid retrieval in one Postgres query: RRF over tsvector + pgvector(21.09.2026 um 14:15 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

Prevent Hugging Face Spaces from Sleeping with GitHub Actions + agent-browser

Hugging Face Spaces are incredibly convenient for hosting demos, tools, and lightweight apps. https://huggingface.co/ However, there is one limitation: If a Space is not accessed for 48 hours, it goes to sleep. This can be problematic…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Hugging Face Spaces are incredibly convenient for hosting demos, tools, and lightweight apps.



https://huggingface.co/



However, there is one limitation:



If a Space is not accessed for 48 hours, it goes to sleep.



This can be problematic when:

• You share a demo URL and it’s slow on first access (cold start)

• You host automation tools like n8n

• You want your app to always feel “ready”

• You want simple uptime monitoring



To solve this, I built a small automation:



GitHub Actions accesses my Space daily

agent-browser opens the page and takes a screenshot

The screenshot is posted to Discord



This achieves both:

• ✅ Preventing sleep

• ✅ Visual uptime monitoring



In this article, I’ll show you exactly how to set it up.





Why use agent-browser?



You could simply curl the Space URL.



But I wanted:

• A real browser access (not just HTTP ping)

• To confirm the page fully renders

• To capture a screenshot as proof

• To visually verify that nothing is broken



For that, I used agent-browser, a CLI browser automation tool built on Playwright.



It works perfectly inside GitHub Actions.







GitHub logo

vercel-labs
/
agent-browser



Browser automation CLI for AI agents







agent-browser



Headless browser automation CLI for AI agents. Fast Rust CLI with Node.js fallback.



Installation




npm (recommended)




npm install -g agent-browser
agent-browser install # Download Chromium




Homebrew (macOS)





brew install agent-browser
agent-browser install # Download Chromium




From Source





git clone https://github.com/vercel-labs/agent-browser
cd agent-browser
pnpm install
pnpm build
pnpm build:native # Requires Rust (https://rustup.rs)
pnpm link --global # Makes agent-browser available globally
agent-browser install




Linux Dependencies




On Linux, install system dependencies:



agent-browser install --with-deps
# or manually: npx playwright install-deps chromium




Quick Start





agent-browser open example.com
agent-browser snapshot # Get accessibility tree with refs
agent-browser click @e2 # Click by ref from snapshot
agent-browser fill @e3 "[email protected]" # Fill by ref
agent-browser get text @e1 # Get text by ref
agent-browser screenshot page.png
agent-browser close




Traditional Selectors (also supported)





agent-browser click "#submit"
agent-browser fill "#email" "[email protected]"
agent-browser find role button click --name "










The GitHub Actions Workflow



Here is the exact YAML file I use:




on:
schedule:
- cron: "0 0 * * *"

jobs:
access-hugging-face-n8n:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Install agent-browser
run: npm install -g agent-browser

- name: Install Playwright browsers
run: agent-browser install --with-deps

- name: Go to the hugging face space
run: |
agent-browser open ${{ secrets.HUGGING_FACE_SPACE_URL }}
agent-browser wait --text "Sign in"
agent-browser screenshot page.png
agent-browser close

- name: Notify Discord on done access
if: success()
run: |
curl --fail-with-body -sS -X POST \
-F 'payload_json={"content":"Hugging Face access job done."}' \
-F "[email protected];type=image/png" \
"${{ secrets.DISCORD_WEBHOOK_URL }}"








How It Works




  1. Scheduled Daily Run



cron: "0 0 * * *"



This runs once per day at 00:00 UTC.






  1. Install agent-browser



npm install -g agent-browser

agent-browser install --with-deps



This installs Playwright and required browser dependencies inside the GitHub Actions runner.






  1. Open the Hugging Face Space



agent-browser open ${{ secrets.HUGGING_FACE_SPACE_URL }}

agent-browser wait --text "Sign in"

agent-browser screenshot page.png

agent-browser close



What this does:

1. Opens the Space in a real browser

2. Waits until "Sign in" text appears (ensures full render)

3. Takes a screenshot

4. Closes the browser



The wait --text step prevents taking screenshots before the page is fully loaded.



You can change the text to something more specific to your app.






  1. Post Screenshot to Discord



curl -X POST \

-F 'payload_json={"content":"Hugging Face access job done."}' \

-F "file1=@page.png;type=image/png" \

"${{ secrets.DISCORD_WEBHOOK_URL }}"



This sends:

• A success message

• The screenshot image



to your Discord channel via webhook.



Now you have both:

• Sleep prevention

• Daily visual health check





Setting Up Secrets



In your GitHub repository:



Settings → Secrets and variables → Actions



Add:

• HUGGING_FACE_SPACE_URL

• DISCORD_WEBHOOK_URL



These are securely injected into the workflow using:



${{ secrets.SECRET_NAME }}





Why This Approach Is Nice



✅ Free to run



GitHub Actions free tier is sufficient.



✅ No server required



No EC2, no cron server, no maintenance.



✅ Real browser check



Not just ping — full rendering validation.



✅ Visual confirmation



You instantly see if something broke.



✅ Easy to extend



Add monitoring, metrics, multi-Space support.





Optional Improvements



You could extend this further:

• Fail the job if specific text is missing

• Measure page load time

• Upload screenshots to S3 / R2

• Monitor multiple Spaces in parallel

• Add Slack notifications

• Store screenshots as GitHub Action artifacts



You can even turn this into a lightweight uptime monitoring system.



huggingface_space





Conclusion



Hugging Face Spaces going to sleep can be inconvenient.



But with:



GitHub Actions + agent-browser



you can:

• Automatically keep your Space awake

• Capture daily screenshots

• Get notified via Discord

• Monitor visual health



All without running your own server.



Simple, effective, and fully automated.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Prevent Hugging Face Spaces from Sleeping with GitHub Actions + agent-browser

Thematisch verwandte Begriffe: Prevent, Hugging, Face, Spaces · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-94097 | A vulnerability was determined in Netcore NBR200V2 1.3.241127.071246. Th…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick