-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.38 KB
/
render-report.yaml
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
51
52
name: render-report
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches:
- main
jobs:
render-report:
runs-on: macos-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repos
uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Setup pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Install latex
uses: r-lib/actions/setup-tinytex@v2
- name: Install dependencies
uses: r-lib/actions/setup-renv@v2
- name: Compile the report
run: |
rmarkdown::render("report/results.Rmd")
rmarkdown::render("report/supplement/Supplement.Rmd")
shell: Rscript {0}
- name: Create Pull Request
if: github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v7
with:
commit-message: "Update rendered report"
title: "Update rendered report"
body: "This is an automated pull request to update the rendered report."
branch: "render-report-${{ github.run_number }}"
labels: "documentation"
add-paths: |
report/results.pdf
report/supplement/Supplement.pdf
token: ${{ secrets.GITHUB_TOKEN }}