Skip to content

Commit 9764a82

Browse files
if statement for checkout to work better with PRs
1 parent 12d1850 commit 9764a82

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/draft-pdf.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ jobs:
1414
steps:
1515
- name: Checkout
1616
uses: actions/checkout@v4
17+
- name: Checkout for PRs
18+
if: ${{ github.event_name == 'pull_request' }}
19+
uses: actions/checkout@v4
20+
with:
21+
repository: ${{ github.event.pull_request.head.repo.full_name }}
22+
ref: ${{ github.event.pull_request.head.ref }}
1723
- name: Build draft PDF
1824
uses: openjournals/openjournals-draft-action@master
1925
with:
@@ -33,4 +39,3 @@ jobs:
3339
with:
3440
message: '(auto) Paper PDF Draft'
3541
add: 'paper/paper.pdf'
36-
push: origin HEAD:${{ github.head_ref }}

0 commit comments

Comments
 (0)