From cc7cab455508e6247b4d31bcb8caf669b01b5987 Mon Sep 17 00:00:00 2001 From: Ben Allfree Date: Sat, 9 Aug 2025 16:54:05 -0700 Subject: [PATCH] chore(root): update GA with pull_request_target --- .github/workflows/publish-dashboard.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-dashboard.yaml b/.github/workflows/publish-dashboard.yaml index 36ff1ff5..fb40634c 100644 --- a/.github/workflows/publish-dashboard.yaml +++ b/.github/workflows/publish-dashboard.yaml @@ -7,7 +7,7 @@ on: - packages/dashboard/** - package.json - pnpm-lock.yaml - pull_request: + pull_request_target: types: [opened, synchronize, reopened] paths: - .github/workflows/publish-dashboard.yaml @@ -30,6 +30,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4.1.1 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} + persist-credentials: false - name: pnpm uses: pnpm/action-setup@v3.0.0 @@ -58,7 +62,7 @@ jobs: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} gitHubToken: ${{ secrets.GITHUB_TOKEN }} - command: pages deploy ./packages/dashboard/build --project-name=pockethost --branch=${{ github.head_ref || github.ref_name }} + command: pages deploy ./packages/dashboard/build --project-name=pockethost --branch=${{ github.event.pull_request.head.ref || github.ref_name }} - name: Find related pull request id: find_pr