scrape #89560
This file contains 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: scrape | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '*/5 * * * *' | |
jobs: | |
scrape: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out this repo | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install all necessary packages | |
run: pip install requests beautifulsoup4 pandas | |
- name: Run the scraping script | |
run: python scraper.py | |
- name: Commit and push if content changed | |
run: |- | |
git config user.name "Automated" | |
git config user.email "actions@users.noreply.github.com" | |
git add -A | |
timestamp=$(date -u) | |
git commit -m "Latest data: ${timestamp}" || exit 0 | |
git push |