Build NV-Ingest Documentation (legacy Docker site, artifact only) workflow (NVIDIA/NeMo-Retriever)
The Build NV-Ingest Documentation (legacy Docker site, artifact only) workflow from NVIDIA/NeMo-Retriever, explained and optimized by Latchkey.
CI health: B - good
Run this on Latchkey for self-healing, caching, and up to 58% lower cost.
Grade your own workflow free or run it on Latchkey →What it does
This is the Build NV-Ingest Documentation (legacy Docker site, artifact only) workflow from the NVIDIA/NeMo-Retriever repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
# Legacy full-site Docker documentation build (nv-ingest HTML + bundled MkDocs).
#
# Public GitHub Pages at https://nvidia.github.io/NeMo-Retriever/ must be published ONLY by
# nrl-docs-github-pages.yml (mkdocs.yml - 13-section NRL TOC). This workflow
# must not call deploy-pages or it will overwrite that site with the old navigation.
#
# For the same Docker pipeline on every push to main (CI only), see docs-deploy.yml.
name: Build NV-Ingest Documentation (legacy Docker site, artifact only)
on:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: docs-legacy-docker-artifact
cancel-in-progress: false
jobs:
build:
runs-on: linux-large-disk
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
run: |
docker build -f Dockerfile --target docs --build-arg GIT_COMMIT=${GITHUB_SHA} -t nv-ingest-docs:latest .
- name: Run the container
run: |
CONTAINER_ID=$(docker run -d nv-ingest-docs:latest)
echo "CONTAINER_ID=$CONTAINER_ID" >> $GITHUB_ENV
- name: Wait for the docs generation to complete in the container
run: |
EXIT_CODE=$(docker wait $CONTAINER_ID)
docker logs $CONTAINER_ID
if [ "$EXIT_CODE" != "0" ]; then
echo "Error: docs build failed with exit code $EXIT_CODE"
exit 1
fi
- name: Copy generated docs site from the container
run: docker cp $CONTAINER_ID:/workspace/docs/site ./generated-site
- name: Stop and remove the container
run: docker rm $CONTAINER_ID
- name: Upload legacy Docker site (not deployed to Pages)
uses: actions/upload-artifact@v4
with:
name: nv-ingest-docs-docker-site
path: ./generated-site
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
# Legacy full-site Docker documentation build (nv-ingest HTML + bundled MkDocs). # # Public GitHub Pages at https://nvidia.github.io/NeMo-Retriever/ must be published ONLY by # nrl-docs-github-pages.yml (mkdocs.yml - 13-section NRL TOC). This workflow # must not call deploy-pages or it will overwrite that site with the old navigation. # # For the same Docker pipeline on every push to main (CI only), see docs-deploy.yml. name: Build NV-Ingest Documentation (legacy Docker site, artifact only) on: workflow_dispatch: permissions: contents: read concurrency: group: docs-legacy-docker-artifact cancel-in-progress: false jobs: build: timeout-minutes: 30 runs-on: linux-large-disk steps: - name: Checkout code uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build Docker image run: | docker build -f Dockerfile --target docs --build-arg GIT_COMMIT=${GITHUB_SHA} -t nv-ingest-docs:latest . - name: Run the container run: | CONTAINER_ID=$(docker run -d nv-ingest-docs:latest) echo "CONTAINER_ID=$CONTAINER_ID" >> $GITHUB_ENV - name: Wait for the docs generation to complete in the container run: | EXIT_CODE=$(docker wait $CONTAINER_ID) docker logs $CONTAINER_ID if [ "$EXIT_CODE" != "0" ]; then echo "Error: docs build failed with exit code $EXIT_CODE" exit 1 fi - name: Copy generated docs site from the container run: docker cp $CONTAINER_ID:/workspace/docs/site ./generated-site - name: Stop and remove the container run: docker rm $CONTAINER_ID - name: Upload legacy Docker site (not deployed to Pages) uses: actions/upload-artifact@v4 with: name: nv-ingest-docs-docker-site path: ./generated-site
What changed
- Add a job timeout so a hung step cannot burn hours of runner time.
1 third-party action is referenced by a movable tag. Pin it to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.
What Latchkey heals here
This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:
- Container pulls and builds
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.