Skip to content
Draft
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
31 changes: 31 additions & 0 deletions .github/workflows/fern-docs-preview-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (c) 2026, NVIDIA CORPORATION.
#
# 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.

# Build half (collector) of the Fern docs preview pair.
#
# Fork-PR safe: collects fern/ sources and PR metadata into an artifact
# without using any secrets. The companion comment workflow runs in the
# base-repo context via workflow_run and consumes the artifact.
#
name: "Preview Fern Docs: Build"

on:
pull_request:
paths:
- 'fern/**'
- '.github/workflows/fern-docs-preview-build.yml'

jobs:
collect:
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_fern_docs_preview_build.yml@mmck-docs-fern
33 changes: 33 additions & 0 deletions .github/workflows/fern-docs-preview-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright (c) 2026, NVIDIA CORPORATION.
#
# 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.

# Cleanup half of the Fern docs preview cleanup pair.
#
# Triggered by workflow_run after "Preview Fern Docs: Close" completes.
# Reads the preview URL artifact and calls fern docs preview delete --url.
#
# Required repo or org secret: DOCS_FERN_TOKEN

name: "Preview Fern Docs: Cleanup"

on:
workflow_run:
workflows: ["Preview Fern Docs: Close"]
types: [completed]

jobs:
cleanup:
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_fern_docs_preview_cleanup.yml@mmck-docs-fern
secrets:
DOCS_FERN_TOKEN: ${{ secrets.DOCS_FERN_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/fern-docs-preview-close.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright (c) 2026, NVIDIA CORPORATION.
#
# 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.

# Close half (collector) of the Fern docs preview cleanup pair.
#
# Fork-PR safe: reads the preview URL marker from the PR comment using
# read-only GITHUB_TOKEN access and uploads it as an artifact for the
# cleanup workflow to consume.
#

name: "Preview Fern Docs: Close"

on:
pull_request:
types: [closed]

jobs:
close:
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_fern_docs_preview_close_collect.yml@mmck-docs-fern
34 changes: 34 additions & 0 deletions .github/workflows/fern-docs-preview-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright (c) 2026, NVIDIA CORPORATION.
#
# 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.

# Comment half of the Fern docs preview pair.
#
# Triggered by workflow_run after "Preview Fern Docs: Build" completes.
# Runs in the base-repo context, so DOCS_FERN_TOKEN is available even when
# the originating PR is from a fork.
#
# Required repo or org secret: DOCS_FERN_TOKEN

name: "Preview Fern Docs: Comment"

on:
workflow_run:
workflows: ["Preview Fern Docs: Build"]
types: [completed]

jobs:
preview:
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_fern_docs_preview_comment.yml@mmck-docs-fern
secrets:
DOCS_FERN_TOKEN: ${{ secrets.DOCS_FERN_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/fern-docs-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright (c) 2026, NVIDIA CORPORATION.
#
# 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 on push to main and on manual dispatch.
#
# Required repo or org secret: DOCS_FERN_TOKEN

name: Publish Fern Docs

on:
push:
branches: [main]
paths:
- 'fern/**'
- '.github/workflows/fern-docs-publish.yml'
workflow_dispatch:

concurrency:
group: fern-docs-publish
cancel-in-progress: false

jobs:
publish:
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_fern_docs_publish.yml@mmck-docs-fern
secrets:
DOCS_FERN_TOKEN: ${{ secrets.DOCS_FERN_TOKEN }}
Loading
Loading