Update and Format Docs #16
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 and Format Docs | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 5 * * 1' # Runs every Monday at 05:00 UTC | |
| jobs: | |
| update-docs: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install package with dev extras | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install .[dev] | |
| - name: Run docs/generate_indices.py | |
| run: python docs/generate_indices.py | |
| - name: Configure git | |
| run: | | |
| git config --global user.name "github-actions" | |
| git config --global user.email "actions@github.com" | |
| - name: Run pre-commit hooks (ignore failures) | |
| run: pre-commit run --all-files || true | |
| - name: Add all changes | |
| run: | | |
| git add -A | |
| - name: Commit changes | |
| run: | | |
| git commit -m "Auto-update documentation indices" || echo "No changes to commit" | |
| - name: Push changes | |
| run: git push |