Skip to content

NRL documentation — GitHub Pages #364

NRL documentation — GitHub Pages

NRL documentation — GitHub Pages #364

# NeMo Retriever Library (NRL) documentation — sole publisher to GitHub Pages for this repo.
# Does not run the full Docker + Sphinx pipeline (no nv-ingest / nv-ingest-api HTML API dump).
# Full-pipeline doc builds run in docs-deploy.yml (CI only, no deploy).
name: NRL documentation — GitHub Pages
on:
push:
branches:
- main
paths:
- "docs/**"
- "nemo_retriever/**"
- ".github/workflows/nrl-docs-github-pages.yml"
schedule:
# Nightly (UTC): pick up doc changes even if no pushes
- cron: "0 7 * * *"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
name: Build NRL docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Configure Pages
id: pages
if: ${{ github.repository == 'NVIDIA/NeMo-Retriever' }}
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: docs/requirements.txt
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
pip install -e ./nemo_retriever
- name: Write scan summary for the workflow run
run: |
{
echo "### Non-NRL / legacy reference scan (excerpt)"
echo "Full report is attached as an artifact."
echo
echo '```'
python docs/scripts/scan_non_nrl_doc_references.py | head -n 120
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
- name: Scan for non-NRL references (full report)
run: python docs/scripts/scan_non_nrl_doc_references.py | tee non-nrl-review.txt
- name: Upload non-NRL scan artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: non-nrl-content-review
path: non-nrl-review.txt
- name: Build MkDocs (NRL only)
working-directory: docs
env:
SITE_URL: ${{ steps.pages.outputs.base_url || 'https://example.invalid/' }}
DISABLE_MKDOCS_2_WARNING: "true"
run: mkdocs build -f mkdocs.yml --strict
- name: Upload Pages artifact
if: ${{ github.repository == 'NVIDIA/NeMo-Retriever' }}
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: docs/site
- name: Upload docs artifact (non-Pages repos)
if: ${{ github.repository != 'NVIDIA/NeMo-Retriever' }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: nrl-docs-site
path: docs/site
deploy:
name: Deploy to GitHub Pages
if: ${{ github.repository == 'NVIDIA/NeMo-Retriever' }}
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4