Daily flat search #39
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: Daily flat search | |
| on: | |
| schedule: | |
| - cron: "17 6 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: daily-flat-search | |
| cancel-in-progress: false | |
| jobs: | |
| search: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 180 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - run: pip install -r requirements.txt | |
| - run: python -m playwright install --with-deps chromium | |
| - name: Search and notify | |
| env: | |
| TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
| TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} | |
| run: python flat_finder.py | |
| - name: Upload scraper diagnostics | |
| if: always() | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: scraper-diagnostics | |
| path: diagnostics/ | |
| if-no-files-found: ignore | |
| retention-days: 3 | |
| - name: Persist sent listing IDs | |
| run: | | |
| if git diff --quiet -- state.json; then exit 0; fi | |
| git config user.name "flat-finder-bot" | |
| git config user.email "flat-finder-bot@users.noreply.github.com" | |
| git add state.json | |
| git commit -m "chore: update seen listings" | |
| git push |