Update Johnson City Guide #1
This file contains hidden or 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 Johnson City Guide | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Run daily at midnight | |
workflow_dispatch: # Allow manual triggering | |
jobs: | |
update-guide: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests | |
pip install yamllint | |
- name: Fetch and update data | |
run: | | |
python update_guide.py | |
yamllint data/ | |
- name: Commit and push changes | |
run: | | |
git config --global user.name 'Cline' | |
git config --global user.email 'cline@example.com' | |
git add data/ | |
git diff --quiet || git commit -m "Update guide with new data" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |