Keep Streamlit App Alive #618
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: Keep Streamlit App Alive | |
| on: | |
| schedule: | |
| # Runs every 1 hour | |
| - cron: '0 * * * *' | |
| workflow_dispatch: # Allows manual trigger | |
| jobs: | |
| ping: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Ping Streamlit App | |
| run: | | |
| echo "Pinging app at $(date)" | |
| curl -f https://quickbrain.streamlit.app/ || echo "Ping failed" | |
| - name: Keep app warm | |
| run: | | |
| # Make multiple requests to ensure app stays active | |
| for i in {1..3}; do | |
| curl -s https://quickbrain.streamlit.app/ > /dev/null | |
| sleep 2 | |
| done | |
| echo "Keep-alive ping completed" |