generate_calendar #94
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: generate_calendar | |
on: | |
# push: | |
# branches: | |
# - main | |
schedule: | |
- cron: "0 */12 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: pip | |
- name: Install Python dependencies | |
run: pip install -r requirements.txt | |
- name: Generate calendar files | |
env: | |
SEASON: ${{ vars.SEASON }} | |
LEAGUE: ${{ vars.LEAGUE }} | |
OUTPUT_ROOT: ${{ github.workspace }} | |
run: |- | |
cd $GITHUB_WORKSPACE | |
python -m src.main | |
- name: Commit calendar files if changed | |
run: |- | |
git diff | |
git config --global user.email "actions@users.noreply.github.com" | |
git config --global user.name "JEFF-bot" | |
git add -A | |
git commit -m "Updated calendars" || exit 0 | |
git push |