Skip to content

fix(safe-synthesizer): rework CLI surface #1243

fix(safe-synthesizer): rework CLI surface

fix(safe-synthesizer): rework CLI surface #1243

# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# Workflow 1 of 2 for Fern doc previews.
#
# Collects the docs/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.yaml) 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/**'
- '.github/workflows/fern-docs-preview-build.yaml'
permissions:
contents: read
jobs:
collect:
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
lfs: true
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" -- '*.mdx' > preview-metadata/changed_mdx_files 2>/dev/null || true
- name: Prepare preview
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
HEAD_REF: ${{ github.head_ref }}
BASE_REF: ${{ github.base_ref }}
run: |
npm --prefix docs/fern run prepare
- name: Validate LFS docs assets
working-directory: ./docs/fern
run: node scripts/validate-lfs-assets.mjs
- name: Upload fern sources and metadata
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: fern-preview
path: |
docs/
preview-metadata/
retention-days: 1