-
Notifications
You must be signed in to change notification settings - Fork 11
50 lines (47 loc) · 1.54 KB
/
render-pdf.yaml
File metadata and controls
50 lines (47 loc) · 1.54 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Generate PDF
on:
pull_request_target:
types:
- opened
- assigned
branches:
- main
permissions:
pull-requests: write
jobs:
convert_via_pandoc:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Get all changed markdown files
id: changed-markdown-files
uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47
with:
# Avoid using single or double quotes for multiline patterns
files: |
**.md
- name: List all changed files markdown files
id: files_list
if: steps.changed-markdown-files.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-markdown-files.outputs.all_changed_files }}
uses: docker://pandoc/latex:3.8
with:
args: -f markdown+rebase_relative_paths --output=output/proposal.pdf ${{ steps.changed-markdown-files.outputs.all_changed_files }}
- uses: actions/upload-artifact@v6
id: artifact
with:
name: proposal
path: output/proposal.pdf
if-no-files-found: error
archive: false
- name: Comment PR
uses: thollander/actions-comment-pull-request@v3
id: message-pdf
with:
message: |
Hello! [Here's your application in pdf](${{ steps.artifact.outputs.artifact-url}})
github-token: ${{ secrets.comments}}
comment-tag: pdf