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"