Skip to content

Commit 04ccb39

Browse files
authored
fix: Ensure PR preview cleanup checks out repo on close (#396)
1 parent 8521997 commit 04ccb39

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/pr.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,22 @@ jobs:
6161
contents: write
6262
pull-requests: write
6363
steps:
64-
- name: Checkout
64+
- name: Checkout PR branch
6565
uses: actions/checkout@v5
6666
if: ${{ github.event.action != 'closed' }}
6767
with:
6868
repository: ${{ github.event.pull_request.head.repo.full_name }}
6969
ref: ${{ github.event.pull_request.head.sha }}
7070
persist-credentials: false
7171

72+
- name: Checkout base branch
73+
uses: actions/checkout@v5
74+
if: ${{ github.event.action == 'closed' }}
75+
with:
76+
repository: ${{ github.event.pull_request.base.repo.full_name }}
77+
ref: ${{ github.event.pull_request.base.ref }}
78+
persist-credentials: false
79+
7280
- name: Setup Node.js
7381
uses: actions/setup-node@v6
7482
if: ${{ github.event.action != 'closed' }}

0 commit comments

Comments
 (0)