Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 20 additions & 15 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
push:
branches:
- dev
# - main # Uncomment after dev is merged into main
- main
paths:
- "docs/**"
- "pyproject.toml"
Expand Down Expand Up @@ -46,8 +46,13 @@ jobs:
enable-cache: true
cache-dependency-glob: "pyproject.toml"

- name: Build documentation
run: uv run --group docs sphinx-build docs docs/_build/html -W --keep-going
- name: Build documentation (dev)
if: github.ref == 'refs/heads/dev'
run: DOCS_VERSION=dev uv run --group docs sphinx-build docs docs/_build/html -W --keep-going

- name: Build documentation (stable)
if: github.ref == 'refs/heads/main'
run: DOCS_VERSION=stable uv run --group docs sphinx-build docs docs/_build/html -W --keep-going

- name: Deploy docs (dev branch)
if: github.ref == 'refs/heads/dev'
Expand All @@ -62,15 +67,15 @@ jobs:
user_email: "github-actions[bot]@users.noreply.github.com"
commit_message: "docs: deploy dev from ${{ github.sha }}"

# Uncomment after dev is merged into main
# - name: Deploy docs (main branch)
# if: github.ref == 'refs/heads/main'
# uses: peaceiris/actions-gh-pages@v4
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./docs/_build/html
# publish_branch: gh-pages
# keep_files: true
# user_name: "github-actions[bot]"
# user_email: "github-actions[bot]@users.noreply.github.com"
# commit_message: "docs: deploy from ${{ github.sha }}"
- name: Deploy docs (main branch)
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
publish_branch: gh-pages
destination_dir: stable
keep_files: true
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
commit_message: "docs: deploy stable from ${{ github.sha }}"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Developer companion repo for working with NVIDIA's Nemotron models: inference, f
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)
[![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](CONTRIBUTING.md)
[![Docs](https://img.shields.io/badge/docs-dev-76B900.svg)](https://nvidia-nemo.github.io/Nemotron/dev/)

---

Expand Down
11 changes: 8 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

import os

project = "Nemotron"
copyright = "2025, NVIDIA Corporation"
author = "NVIDIA Corporation"
release = "latest"

# Version is set by CI via DOCS_VERSION env var (dev or stable)
# Defaults to "dev" for local builds
release = os.environ.get("DOCS_VERSION", "dev")

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down Expand Up @@ -76,7 +81,7 @@
html_theme = "nvidia_sphinx_theme"
html_theme_options = {
"switcher": {
"json_url": "versions1.json",
"json_url": "https://nvidia-nemo.github.io/Nemotron/versions.json",
"version_match": release,
},
"icon_links": [
Expand All @@ -97,7 +102,7 @@
"""
},
}
html_extra_path = ["project.json", "versions1.json"]
html_extra_path = ["project.json", "versions.json"]

# Github links are now getting rate limited from the Github Actions
linkcheck_ignore = [
Expand Down
13 changes: 13 additions & 0 deletions docs/versions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"name": "dev",
"version": "dev",
"url": "https://nvidia-nemo.github.io/Nemotron/dev/"
},
{
"name": "stable (main)",
"version": "stable",
"url": "https://nvidia-nemo.github.io/Nemotron/stable/",
"preferred": true
}
]
7 changes: 0 additions & 7 deletions docs/versions1.json

This file was deleted.