From 16d8b14eb38c63669e58c09639d2d22159e46067 Mon Sep 17 00:00:00 2001 From: Himmel Date: Tue, 27 May 2025 08:37:01 +0800 Subject: [PATCH] switch to pull_request_target and update checkout step - Update checkout step to use specific ref and repository from the PR --- .github/workflows/pr-preview.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 6a0fd0b..d121485 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -1,7 +1,7 @@ name: Pr preview on: - pull_request: + pull_request_target: jobs: build-and-deploy: @@ -16,6 +16,8 @@ jobs: - name: Checkout Documentation Repository (ivorysql_doc) uses: actions/checkout@v4 with: + ref: ${{ github.event.pull_request.head.sha }} + repository: ${{ github.event.pull_request.head.repo.full_name }} path: ivorysql_doc - name: Fetch All Relevant Branches into Local Docs Repo