From 0ddfc9133a034f45d21c1a5fae839ad425888b74 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 9 Mar 2026 18:53:32 +0000 Subject: [PATCH] feat: use stable preview URLs and skip draft PRs Pass --preview-id with the PR number so all commits in a PR share the same preview URL. Skip preview generation for draft PRs. Co-Authored-By: blank --- .github/workflows/preview-docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/preview-docs.yml b/.github/workflows/preview-docs.yml index 252b277..e75b0c3 100644 --- a/.github/workflows/preview-docs.yml +++ b/.github/workflows/preview-docs.yml @@ -4,6 +4,7 @@ on: pull_request jobs: run: + if: github.event.pull_request.draft == false runs-on: ubuntu-latest permissions: contents: read @@ -20,7 +21,7 @@ jobs: env: FERN_TOKEN: ${{ secrets.FERN_TOKEN }} run: | - OUTPUT=$(fern generate --docs --preview 2>&1) || true + OUTPUT=$(fern generate --docs --preview --preview-id ${{ github.event.pull_request.number }} 2>&1) || true echo "$OUTPUT" URL=$(echo "$OUTPUT" | grep -oP 'Published docs to \K.*(?= \()') echo "Preview URL: $URL"