update links #4
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: documentation | |
| on: | |
| push: | |
| branches: | |
| - refactor/v2 | |
| schedule: | |
| - cron: "0 0 1 * *" # Run monthly, first day of the month at 00:00 UTC | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure Git Credentials | |
| run: | | |
| git config user.name github-actions[bot] | |
| git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.x | |
| - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | |
| - uses: actions/cache@v4 | |
| with: | |
| key: mkdocs-material-${{ env.cache_id }} | |
| path: .cache | |
| restore-keys: | | |
| mkdocs-material- | |
| - name: Install dependencies | |
| run: | | |
| python -m venv doc_env | |
| . doc_env/bin/activate | |
| python -m pip install --upgrade pip setuptools wheel | |
| python -m pip install \ | |
| "mkdocs==1.5.3" \ | |
| "mkdocs-material==9.5.9" \ | |
| "mkdocstrings[python]>=0.26.1" \ | |
| "mkdocs-gen-files==0.5.0" \ | |
| "mkdocs-literate-nav==0.6.1" \ | |
| "mkdocs-section-index==0.3.8" \ | |
| mkdocs-glightbox \ | |
| mkdocs-material-extensions \ | |
| mkdocs-minify-plugin \ | |
| requests tabulate # Needed for publication scripts | |
| # --- NEW: Run your scripts before docs --- | |
| - name: Fetch publications | |
| run: | | |
| . doc_env/bin/activate | |
| python scripts/fetch_publications.py --author "Shantenu Jha" | |
| - name: Generate Markdown page | |
| run: | | |
| . doc_env/bin/activate | |
| python scripts/generate_publications_md.py | |
| # --- Build and deploy docs --- | |
| - name: Build and deploy docs | |
| run: | | |
| . doc_env/bin/activate | |
| mkdocs gh-deploy --force |