-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (53 loc) · 2.27 KB
/
render-skeleton-rmd.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Workflow derived from https://rfortherestofus.com/2023/05/github-actions
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
workflow_dispatch:
pull_request:
branches: [ master, main, develop ]
name: render-visc-empty-skeleton-rmd
jobs:
render-visc-empty-skeleton-rmd:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout VISCtemplates repo
uses: actions/checkout@v4
- name: Install pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Set up tinytex
uses: r-lib/actions/setup-tinytex@v2
- name: Set up R
uses: r-lib/actions/setup-r@v2
- name: Install R packages from VISCtemplates DESCRIPTION file and any others needed
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: |
any::remotes
any::devtools
any::conflicted
any::tidyverse
- name: Install VISCfunctions from GitHub
run: |
Rscript -e 'remotes::install_github("FredHutch/VISCfunctions")'
- name: Install VISCtemplates
run: |
Rscript -e 'devtools::install()'
- name: Render visc_empty and visc_report versions of skeleton.Rmd to all output formats
run: |
Rscript -e 'rmarkdown::render("inst/rmarkdown/templates/visc_empty/skeleton/skeleton.Rmd", output_format="all")'
Rscript -e 'rmarkdown::render("inst/rmarkdown/templates/visc_report/skeleton/skeleton.Rmd", output_format="all")'
- name: Upload visc_empty skeleton.docx and skeleton.pdf as GitHub action artifact
uses: actions/upload-artifact@v4
with:
name: visc-empty-skeleton-pdf-and-docx
path: |
inst/rmarkdown/templates/visc_empty/skeleton/skeleton.pdf
inst/rmarkdown/templates/visc_empty/skeleton/skeleton.docx
- name: Upload visc_report skeleton.docx and skeleton.pdf as GitHub action artifact
uses: actions/upload-artifact@v4
with:
name: visc-report-skeleton-pdf-and-docx
path: |
inst/rmarkdown/templates/visc_report/skeleton/skeleton.pdf
inst/rmarkdown/templates/visc_report/skeleton/skeleton.docx