Skip to content

real-estate-scrape #1074

real-estate-scrape

real-estate-scrape #1074

name: real-estate-scrape
on:
workflow_dispatch:
schedule:
- cron: '00 05 * * *'
jobs:
real-estate-scrape:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install real-estate-scrape
run: |
pip install real-estate-scrape
- name: Run scraper
env:
REDFIN_URL: ${{ secrets.REDFIN_URL }}
ZILLOW_URL: ${{ secrets.ZILLOW_URL }}
SCRAPERAPI_KEY: ${{ secrets.SCRAPERAPI_KEY }}
run: real-estate-scrape
- name: Commit and push if it changed
run: |-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add -A
timestamp=$(date -u)
git commit -m "Scraped at ${timestamp}" || exit 0
git push
- name: Set workflow status
# success if NaN is not present in last line of data.csv
run: tail -1 data.csv | grep -q -v NaN