Skip to content

docs(retrieval): complete fine-tuning guide integration (#2306) #76

docs(retrieval): complete fine-tuning guide integration (#2306)

docs(retrieval): complete fine-tuning guide integration (#2306) #76

# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Publishes the Fern documentation site when a docs tag is pushed or manually triggered.
#
# To publish: git tag docs/v1.2.0 && git push origin docs/v1.2.0
# Or use the "Run workflow" button in the Actions tab.
#
# Required configuration:
# - Organization secret: DOCS_FERN_TOKEN (from `fern token` for the nvidia Fern org)
name: Publish Fern Docs
on:
push:
branches:
- main
paths:
- 'docs/**'
tags:
- 'docs/v*'
workflow_dispatch: {}
permissions:
contents: read
concurrency:
group: fern-publish
cancel-in-progress: true
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
# Backward version trees (frozen GA snapshots) are not kept on main -- only
# the nightly tree (top-level docs/) is. Restore them from their archive ref
# so `fern generate --docs` (a full-site snapshot publish) sees every train.
- name: Stitch archived version pages
uses: ./.github/actions/stitch-fern-versions
with:
archived-versions: |
v0.4=docs-archive
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '20'
- name: Publish Docs
env:
FERN_TOKEN: ${{ secrets.DOCS_FERN_TOKEN }}
working-directory: ./docs/fern
run: |
# Pin the Fern CLI to the version in fern.config.json so production
# publishes use the same CLI as local dev and the global-theme pin.
fern_version=$(jq -r .version fern.config.json)
# Generate the autodoc library reference (product-docs/, gitignored)
# that the version navs mount via `folder: ../product-docs/...`. The
# `libraries:` input is a git source, so this self-clones -- no repo
# prep needed. Without it, `generate --docs` fatals with "Folder not
# found: ../product-docs/nemo-automodel/Full-Library-Reference".
npx -y "fern-api@$fern_version" docs md generate
npx -y "fern-api@$fern_version" generate --docs