Skip to content

ci(uat): enroll azure-h100 inference in nightly batch #1889

ci(uat): enroll azure-h100 inference in nightly batch

ci(uat): enroll azure-h100 inference in nightly batch #1889

# Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# 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.
# Workflow 1 of 2 for Fern doc previews.
#
# Collects the fern/ sources and PR metadata from the (possibly untrusted) PR
# branch and uploads them as an artifact. No secrets are used here, so this is
# safe to run on fork PRs via the regular pull_request trigger.
#
# The companion workflow (fern-docs-preview-comment.yml) picks up the artifact,
# builds the preview with DOCS_FERN_TOKEN, and posts the PR comment.
name: "Preview Fern Docs: Build"
on:
pull_request:
paths:
- 'docs/**'
- 'fern/**'
- '.github/workflows/fern-docs-preview-build.yml'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
collect:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout PR
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- name: Save PR metadata
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
HEAD_REF: ${{ github.head_ref }}
BASE_REF: ${{ github.base_ref }}
run: |
mkdir -p preview-metadata
echo "$PR_NUMBER" > preview-metadata/pr_number
echo "$HEAD_REF" > preview-metadata/head_ref
git diff --name-only "origin/${BASE_REF}...HEAD" -- '*.md' > preview-metadata/changed_md_files 2>/dev/null || true
- name: Checkout frozen version content
run: |
set -eo pipefail
for version_file in fern/versions/v*.yml; do
[ -f "$version_file" ] || continue
version=$(basename "$version_file" .yml)
if git show-ref --verify --quiet "refs/tags/${version}"; then
mkdir -p "fern/versions/${version}-content"
git archive "refs/tags/${version}" -- docs/ | tar -x --strip-components=1 -C "fern/versions/${version}-content"
find "fern/versions/${version}-content" -name '*.md' -print0 | xargs -0 sed -i \
-e 's/{/\\{/g' \
-e 's/}/\\}/g' \
-e 's/</\&lt;/g'
echo "Extracted docs from $version"
else
echo "::warning::Tag $version not found — skipping content checkout"
fi
done
- name: Upload fern sources and metadata
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: fern-preview
path: |
fern/
docs/
preview-metadata/
retention-days: 1