From e8d88f8952b2b884fc6ae4ee18008fb22ae77300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Mart=C3=ADnez?= Date: Sat, 25 Nov 2023 10:14:04 +0100 Subject: [PATCH] Update preview-docs.yml Use pull_request_target to be able to access FERN publication secret --- .github/workflows/preview-docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/preview-docs.yml b/.github/workflows/preview-docs.yml index 4828a7968..49d4255e0 100644 --- a/.github/workflows/preview-docs.yml +++ b/.github/workflows/preview-docs.yml @@ -1,7 +1,7 @@ name: deploy preview docs on: - pull_request: + pull_request_target: branches: - main paths: @@ -28,7 +28,7 @@ jobs: env: FERN_TOKEN: ${{ secrets.FERN_TOKEN }} run: | - output=$(fern generate --docs --preview --log-level debug) + output=$(fern generate --docs --preview) echo "$output" # Extract the URL preview_url=$(echo "$output" | grep -oP '(?<=Published docs to )https://[^\s]*')