Keep App Alive #114
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 App Alive | |
| on: | |
| schedule: | |
| - cron: '0 6,14,22 * * *' | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| wake-up: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' # Cache automatica per le librerie installate con pip | |
| - name: Installa librerie Python | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install playwright requests | |
| # --- AGGIUNTA CACHE QUI --- | |
| - name: Cache Playwright Browsers | |
| id: cache-playwright | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-chromium-v2-${{ runner.os }} | |
| - name: Installa dipendenze di sistema | |
| run: python -m playwright install-deps chromium | |
| - name: Installa Playwright Browser (solo se non in cache) | |
| if: steps.cache-playwright.outputs.cache-hit != 'true' | |
| run: python -m playwright install chromium | |
| - name: Esegui script keep alive | |
| run: python keep_alive.py | |
| env: | |
| APP_URL: https://quizpygym.streamlit.app/ |