Skip to content

Commit 5457b74

Browse files
miyoungcdrew
andauthored
docs: setup initial docs/ infrastructure and scaffolding (#94)
* set up docs * rm nv sphinx theme version * rm v* trigger * incorporate feedback with cursor * minor updates * doc docs * more small tweaks * clean contributing --------- Co-authored-by: Drew Newberry <anewberry@nvidia.com>
1 parent 53a84cc commit 5457b74

16 files changed

Lines changed: 1114 additions & 0 deletions

File tree

‎.github/workflows/docs-build.yml‎

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
name: Docs
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
types: [opened, synchronize]
7+
paths:
8+
- "docs/**"
9+
push:
10+
branches: [main]
11+
workflow_dispatch:
12+
13+
defaults:
14+
run:
15+
shell: bash
16+
17+
env:
18+
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
build:
26+
runs-on: build-arm64
27+
container:
28+
image: ghcr.io/nvidia/nv-agent-env/ci:latest
29+
credentials:
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
36+
- name: Install tools
37+
run: mise install
38+
39+
- name: Build documentation
40+
run: mise run docs:build:strict
41+
42+
- name: Delete unnecessary files
43+
run: |
44+
find _build -name .doctrees -prune -exec rm -rf {} \;
45+
find _build -name .buildinfo -exec rm {} \;
46+
47+
- name: Upload HTML
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: html-build-artifact
51+
path: _build/docs
52+
if-no-files-found: error
53+
retention-days: 1
54+
- name: Store PR information
55+
if: github.event_name == 'pull_request'
56+
run: |
57+
mkdir ./pr
58+
echo ${{ github.event.number }} > ./pr/pr.txt
59+
echo ${{ github.event.pull_request.merged }} > ./pr/merged.txt
60+
echo ${{ github.event.action }} > ./pr/action.txt
61+
62+
- name: Upload PR information
63+
if: github.event_name == 'pull_request'
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: pr
67+
path: pr/
68+
69+
publish:
70+
if: github.event_name == 'push' && github.repository_owner == 'NVIDIA'
71+
needs: [build]
72+
runs-on: build-arm64
73+
container:
74+
image: ghcr.io/nvidia/nv-agent-env/ci:latest
75+
credentials:
76+
username: ${{ github.actor }}
77+
password: ${{ secrets.GITHUB_TOKEN }}
78+
steps:
79+
- uses: actions/checkout@v4
80+
with:
81+
ref: "gh-pages"
82+
83+
- name: Initialize Git configuration
84+
run: |
85+
git config user.name docs-build
86+
git config user.email do-not-send@github.com
87+
88+
- name: Download artifacts
89+
uses: actions/download-artifact@v4
90+
with:
91+
name: html-build-artifact
92+
path: ${{ github.ref_name }}
93+
94+
- name: Copy HTML directories
95+
run: |
96+
ls -asl
97+
for i in `ls -d *`
98+
do
99+
echo "Git adding ${i}"
100+
git add "${i}"
101+
done
102+
- name: Check or create dot-no-jekyll file
103+
104+
run: |
105+
if [ -f ".nojekyll" ]; then
106+
echo "The dot-no-jekyll file already exists."
107+
exit 0
108+
fi
109+
touch .nojekyll
110+
git add .nojekyll
111+
112+
- name: Check or create redirect page
113+
env:
114+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115+
run: |
116+
resp=$(grep 'http-equiv="refresh"' index.html 2>/dev/null) || true
117+
if [ -n "${resp}" ]; then
118+
echo "The redirect file already exists."
119+
exit 0
120+
fi
121+
def_branch=$(gh api "repos/${GITHUB_REPOSITORY}" --jq ".default_branch")
122+
html_url=$(gh api "repos/${GITHUB_REPOSITORY}/pages" --jq ".html_url")
123+
echo '<!DOCTYPE html>' > index.html
124+
echo '<html>' >> index.html
125+
echo ' <head>' >> index.html
126+
echo ' <title>Redirect to documentation</title>' >> index.html
127+
echo ' <meta charset="utf-8">' >> index.html
128+
echo ' <meta http-equiv="refresh" content="3; URL='${html_url}${def_branch}'/index.html">' >> index.html
129+
echo ' <link rel="canonical" href="'${html_url}${def_branch}'/index.html">' >> index.html
130+
echo ' <script language="javascript">' >> index.html
131+
echo ' function redirect() {' >> index.html
132+
echo ' window.location.assign("'${html_url}${def_branch}'/index.html")' >> index.html
133+
echo ' }' >> index.html
134+
echo ' </script>' >> index.html
135+
echo ' </head>' >> index.html
136+
echo ' <body onload="redirect()">' >> index.html
137+
echo ' <p>Please follow the link to the <a href="'${html_url}${def_branch}'/index.html">' >> index.html
138+
echo ${def_branch}'</a> branch documentation.</p>' >> index.html
139+
echo ' </body>' >> index.html
140+
echo '</html>' >> index.html
141+
git add index.html
142+
143+
- name: Commit changes to the GitHub Pages branch
144+
run: |
145+
git status
146+
if git commit -m 'Pushing changes to GitHub Pages.'; then
147+
git push -f
148+
else
149+
echo "Nothing changed."
150+
fi
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: docs-preview-pr
2+
3+
on:
4+
workflow_run:
5+
workflows: [Docs]
6+
types: [completed]
7+
branches-ignore: [main]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
13+
env:
14+
WF_ID: ${{ github.event.workflow_run.id }}
15+
16+
jobs:
17+
preview:
18+
uses: nvidia-merlin/.github/.github/workflows/docs-preview-pr-common.yaml@main

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ credentials/
177177

178178
kubeconfig
179179

180+
# Documentation build output
181+
_build/
182+
180183
# Docker build artifacts (image tarballs, packaged helm charts)
181184
deploy/docker/.build/
182185

‎docs/about/index.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!--
2+
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
SPDX-License-Identifier: Apache-2.0
4+
-->
5+
6+
# About NemoClaw

‎docs/conf.py‎

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
import sys
5+
from datetime import date
6+
from pathlib import Path
7+
8+
sys.path.insert(0, str(Path(__file__).parent.parent))
9+
10+
project = "NVIDIA NemoClaw Developer Guide"
11+
this_year = date.today().year
12+
copyright = f"2025-{this_year}, NVIDIA Corporation"
13+
author = "NVIDIA Corporation"
14+
release = "0.1.0"
15+
16+
extensions = [
17+
"myst_parser",
18+
"sphinx.ext.autodoc",
19+
"sphinx.ext.autosummary",
20+
"sphinx.ext.napoleon",
21+
"sphinx.ext.viewcode",
22+
"sphinx.ext.intersphinx",
23+
"sphinx_copybutton",
24+
"sphinx_design",
25+
"sphinxcontrib.mermaid",
26+
]
27+
28+
autodoc_default_options = {
29+
"members": True,
30+
"undoc-members": False,
31+
"show-inheritance": True,
32+
"member-order": "bysource",
33+
}
34+
autodoc_typehints = "description"
35+
autodoc_class_signature = "separated"
36+
37+
copybutton_exclude = ".linenos, .gp, .go"
38+
39+
exclude_patterns = [
40+
"README.md",
41+
"_build/**",
42+
]
43+
44+
myst_linkify_fuzzy_links = False
45+
myst_heading_anchors = 4
46+
myst_enable_extensions = [
47+
"colon_fence",
48+
"deflist",
49+
"dollarmath",
50+
"fieldlist",
51+
"substitution",
52+
]
53+
myst_links_external_new_tab = True
54+
55+
myst_substitutions = {
56+
"version": release,
57+
}
58+
59+
templates_path = ["_templates"]
60+
61+
html_theme = "nvidia_sphinx_theme"
62+
html_copy_source = False
63+
html_show_sourcelink = False
64+
html_show_sphinx = False
65+
66+
html_domain_indices = False
67+
html_use_index = False
68+
highlight_language = "console"
69+
70+
html_theme_options = {
71+
"icon_links": [
72+
{
73+
"name": "GitHub",
74+
"url": "https://github.com/NVIDIA/NemoClaw",
75+
"icon": "fa-brands fa-github",
76+
"type": "fontawesome",
77+
},
78+
],
79+
}

‎docs/feature1/index.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!--
2+
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
SPDX-License-Identifier: Apache-2.0
4+
-->
5+
6+
# Feature 1

‎docs/feature2/index.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!--
2+
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
SPDX-License-Identifier: Apache-2.0
4+
-->
5+
6+
# Feature 2

‎docs/get-started/index.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!--
2+
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
SPDX-License-Identifier: Apache-2.0
4+
-->
5+
6+
# Get Started

‎docs/index.md‎

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<!--
2+
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
SPDX-License-Identifier: Apache-2.0
4+
-->
5+
6+
# NVIDIA NemoClaw Developer Guide
7+
8+
NemoClaw is the runtime environment for autonomous agents. It provides secure sandboxed execution, cluster management, and infrastructure for running AI agent workloads.
9+
10+
```{toctree}
11+
:caption: About
12+
:hidden:
13+
14+
about/index
15+
```
16+
17+
```{toctree}
18+
:caption: Get Started
19+
:hidden:
20+
21+
get-started/index
22+
```
23+
24+
```{toctree}
25+
:caption: Feature 1
26+
:hidden:
27+
28+
feature1/index
29+
```
30+
31+
```{toctree}
32+
:caption: Feature 2
33+
:hidden:
34+
35+
feature2/index
36+
```
37+
38+
```{toctree}
39+
:caption: Observability
40+
:hidden:
41+
42+
observability/index
43+
```
44+
45+
```{toctree}
46+
:caption: Reference
47+
:hidden:
48+
49+
reference/index
50+
```
51+
52+
```{toctree}
53+
:caption: Troubleshooting
54+
:hidden:
55+
56+
troubleshooting/index
57+
```
58+
59+
```{toctree}
60+
:caption: Resources
61+
:hidden:
62+
63+
resources/index
64+
```

‎docs/observability/index.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!--
2+
SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
SPDX-License-Identifier: Apache-2.0
4+
-->
5+
6+
# Observability

0 commit comments

Comments
 (0)