-
Notifications
You must be signed in to change notification settings - Fork 6
28 lines (25 loc) · 1.2 KB
/
manuscript-preview-comment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Comment on the PR with a link to the preview paper PDF
name: manuscript-preview-comment
on:
pull_request:
types:
- opened
paths:
- "manuscript/**"
jobs:
comment:
runs-on: ubuntu-latest
env:
PREVIEW_BRANCH: preview-pr${{ github.event.number }}
steps:
- name: Create comment with preview link
# Don't use tags: https://julienrenaux.fr/2019/12/20/github-actions-security-risk/
uses: peter-evans/create-or-update-comment@41f3207a84f33bd70388036109082784d059dcaa
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.number }}
body: |
:robot: :wave: Hi there, human. It looks like you're editing the manuscript. I'll build it for you whenever you make changes and place the resulting PDF at: https://github.com/${{ github.repository }}/blob/${{ env.PREVIEW_BRANCH }}/preprint.pdf
You can see the resulting PDF of the GJI version of the manuscript at: https://github.com/${{ github.repository }}/blob/${{ env.PREVIEW_BRANCH }}/gji.pdf
> The preview branch `${{ env.PREVIEW_BRANCH }}` will be deleted when the PR is closed/merged.
comment-author: "github-actions[bot]"