update did the dodgers win #45
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: update did the dodgers win | |
on: | |
schedule: | |
- cron: '0 9 * * *' # 9 AM UTC | |
workflow_dispatch: | |
jobs: | |
update-page: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.ACCESS_TOKEN }} # Use PAT for checkout | |
- name: Set Up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install Dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Run Python Script | |
run: | | |
python update.py | |
- name: Commit and Push Changes | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} # Use PAT for push | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Jonathan Harper" | |
git add index.html | |
git commit -m "Auto-update did the dodgers win" || echo "No changes to commit" | |
git push |