Daily Scrape #17
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: Daily Scrape | |
on: | |
# Schedule at 0:00 UTC every day | |
schedule: | |
- cron: "0 0 * * *" | |
# Allows you to trigger manually from GitHub's Actions tab | |
workflow_dispatch: | |
jobs: | |
scrape: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
pip install requests beautifulsoup4 markdownify | |
- name: Run scraper | |
run: | | |
python scraper.py | |
- name: Commit changes | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git add -A | |
git commit -m "Automated scrape: $(date +'%Y-%m-%d %H:%M:%S')" || echo "No changes to commit" | |
- name: Push changes | |
run: | | |
git push |