Download Events Page #2
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: Download Events Page | |
| on: | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: write | |
| env: | |
| PYTHONUNBUFFERED: "1" | |
| jobs: | |
| download-events: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Download events | |
| run: python scripts/download-events.py | |
| - name: Regenerate homepage | |
| run: python scripts/generate-homepage.py | |
| - name: Configure Git | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Commit changes (if any) | |
| run: | | |
| git add -A docs/events/ config/processing-state.json mkdocs-site/docs/index.md | |
| if git diff --staged --quiet; then | |
| echo "No changes to commit." | |
| exit 0 | |
| fi | |
| ts="$(date -u +"%Y-%m-%d %H:%M:%S UTC")" | |
| git commit -m "Update events ($ts)" | |
| git push origin HEAD:${{ github.ref_name }} |