Run monitor_website.py #66
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: Run monitor_website.py | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests beautifulsoup4 pandas | |
- name: Run monitor_website.py | |
run: python monitor_website.py | |
- name: Commit and push if changed | |
run: | | |
git add . | |
git diff --quiet && git diff --staged --quiet || (git commit -m 'Update discursos_milei.csv'; git push) | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |