Update JSON-LD Events #47
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 JSON-LD Events | |
on: | |
workflow_dispatch: # Allows manual run | |
schedule: | |
- cron: "0 6 * * *" # Runs daily at 6am UTC (~2am Toronto time) | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🧾 Checkout code | |
uses: actions/checkout@v4 | |
- name: 🐍 Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: 📦 Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: ⚙️ Generate daily event JSON-LD | |
run: python scripts/generate_jsonld.py | |
- name: 🔄 Build indexes (all.jsonld + upcoming.jsonld) | |
run: python scripts/build_indexes.py | |
- name: 🚀 Commit and push changes | |
run: | | |
git config user.name "github-actions" | |
git config user.email "[email protected]" | |
git add docs/ | |
git commit -m "🔄 Auto-update JSON-LD data $(date -u '+%Y-%m-%d %H:%M:%S')" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |