chore: release v0.22.0 #84
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: Docs | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "docs/**" | |
| - "mkdocs.yml" | |
| - "requirements-docs.txt" | |
| - ".github/workflows/docs.yml" | |
| - "assets/slmcode-logo.png" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "docs/**" | |
| - "mkdocs.yml" | |
| - "requirements-docs.txt" | |
| - ".github/workflows/docs.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build MkDocs | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| cache-dependency-path: requirements-docs.txt | |
| - name: Install docs deps | |
| run: pip install -r requirements-docs.txt | |
| - name: Sync logo into docs assets | |
| run: | | |
| mkdir -p docs/assets | |
| cp -f assets/slmcode-logo.png docs/assets/slmcode-logo.png | |
| - name: Build site | |
| run: mkdocs build --strict | |
| - name: Upload Pages artifact | |
| if: github.event_name != 'pull_request' | |
| # Pinned to the v3+v4 PAIR on purpose — see the deploy step below. | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: site | |
| deploy: | |
| name: Deploy GitHub Pages | |
| if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| # v4, NOT v5. The bump to upload-pages-artifact@v5 + deploy-pages@v5 in | |
| # ff347b2 broke this deploy twice in a row: the artifact uploads and | |
| # "Build MkDocs" passes, then v5 polls the Pages API, sees | |
| # `updating_pages` for about a minute, reads one empty status and aborts | |
| # with "Timeout reached". The same commit's CI and Vulnerability scan | |
| # were green, and the identical workflow on v3+v4 succeeded on the | |
| # commit immediately before (a217c63), so the pair is the variable. | |
| # | |
| # Re-open the bump when v5 has a fix; nothing else about the Actions | |
| # sweep is reverted. | |
| uses: actions/deploy-pages@v4 |