Filter negative gains in NDCG calculation #2307
Workflow file for this run
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: | |
| - main | |
| pull_request: {} | |
| workflow_dispatch: {} | |
| release: | |
| types: | |
| - published | |
| concurrency: | |
| group: doc-${{github.ref}} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| name: Build documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "π Checkout" | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: πΆοΈ Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: "3.14" | |
| activate-environment: true | |
| - name: π¦ Set up Python dependencies | |
| run: | | |
| uv sync --only-group doc | |
| - id: docs | |
| name: "π Build documentation site" | |
| run: | | |
| sphinx-build docs build/doc | |
| - name: "π€ Package documentation site" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lenskit-docs | |
| path: build/doc | |
| publish: | |
| name: Archive documentation | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build | |
| if: github.event_name == 'push' || (github.event_name == 'release' && !github.event.release.prerelease) | |
| environment: docs | |
| steps: | |
| - name: "π Checkout" | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Check out doc site | |
| uses: actions/checkout@v4 | |
| if: github.event_name != 'release' | |
| with: | |
| repository: lenskit/lenskit-docs | |
| ssh-key: "${{ secrets.DOC_DEPLOY_KEY }}" | |
| path: doc-site | |
| ref: version/latest | |
| - name: Check out doc site (stable) | |
| uses: actions/checkout@v4 | |
| if: github.event_name == 'release' | |
| with: | |
| repository: lenskit/lenskit-docs | |
| ssh-key: "${{ secrets.DOC_DEPLOY_KEY }}" | |
| path: doc-site | |
| ref: version/stable | |
| - name: "π₯ Fetch documentation package" | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: lenskit-docs | |
| path: build/doc | |
| - name: "π» Copy documentation content" | |
| run: | | |
| rsync -avc --delete --exclude=.git/ --exclude=.buildinfo --exclude=.doctrees build/doc/ doc-site/ | |
| - name: "π§³ Commit updated documentation content" | |
| run: | | |
| cd doc-site | |
| git config user.name 'LensKit Doc Bot' | |
| git config user.email 'docbot@lenskit.org' | |
| git add . | |
| if git status --porcelain |grep '^.'; then | |
| git commit -m 'rebuild documentation' | |
| git push | |
| else | |
| echo "no changes to documentation" | |
| fi | |
| - name: "π·οΈ Tag release documentation" | |
| if: github.event_name == 'release' | |
| run: | | |
| cd doc-site | |
| ver=$(echo ${{github.event.release.tag_name}} | sed -e 's/^v//') | |
| git checkout -b version/$ver | |
| git push origin version/$ver | |
| - name: "π§πΌβπ€ Activate documentation publication" | |
| uses: actions/script@v7 | |
| with: | |
| github-token: "${{ secrets.DOC_TOKEN }}" | |
| script: | | |
| github.rest.actions.createWorkflowDispatch({ | |
| owner: 'lenskit', | |
| repo: 'lenskit-docs', | |
| workflow_id: 'publish.yml', | |
| ref: 'main', | |
| }) |