chore(root): update GA with pull_request_target

This commit is contained in:
Ben Allfree 2025-08-09 16:54:05 -07:00
parent 2e4ae1f417
commit cc7cab4555

View File

@ -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