Skip to content

Run Scraper

Run Scraper #71

Workflow file for this run

name: Run Scraper
on:
push:
branches:
- '*' # Triggers on all branches
schedule:
- cron: "0 23 * * 5" # Runs every Friday at 6 PM EST (23:00 UTC)
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: pip install requests bs4 tabula-py pandas slack-sdk aiohttp
- name: Run scraper
run: python scrape.py
- name: Commit and push if changed
run: |-
git config --global user.name "eviction_notice_bot"
git config --global user.email "[email protected]"
git pull
git add -A
timestamp=$(date -u)
git commit -m "New scheduled evictions data available: ${timestamp}" || exit 0
git push