AI-notes-agent / .github /workflows /keep_alive.yml
Jaleed02's picture
chore: add keep-alive script for Supabase and HF Spaces
63e2d1a
Raw
History Blame Contribute Delete
1.07 kB
name: Keep Infrastructure Awake
on:
schedule:
# Run every day at midnight UTC to prevent HF Space from pausing (48h limit)
- cron: '0 0 * * *'
workflow_dispatch: # Allows manual trigger from GitHub UI for testing
jobs:
ping_infrastructure:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install supabase python-dotenv requests
# Note: We just install the minimal required packages for the script
# to run fast and avoid dependency conflicts from the main app.
- name: Run keep alive script
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
HF_SPACE_URL: ${{ vars.HF_SPACE_URL }}
run: |
python scripts/keep_alive.py