VLR Daily Scraper #15
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: VLR Daily Scraper | |
| on: | |
| schedule: | |
| # Roda todo dia às 04:30 UTC | |
| - cron: '30 2 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| scrape_and_update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout do código | |
| uses: actions/checkout@v5 | |
| - name: Configurar Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| cache-dependency-path: 'requirements_scraper.txt' | |
| - name: Instalar Dependências | |
| run: pip install -r requirements_scraper.txt | |
| - name: Rodar o Scraper com Retry | |
| uses: nick-fields/retry@v4 | |
| with: | |
| timeout_minutes: 10 # Tempo máximo de cada tentativa | |
| max_attempts: 3 # Tenta até 3 vezes se der erro | |
| retry_wait_seconds: 60 # Espera 1 minuto entre as tentativas | |
| command: python src/auto_scraper.py | |
| env: | |
| DATABASE_URL: ${{ secrets.DATABASE_URL }} |