-
Notifications
You must be signed in to change notification settings - Fork 54
49 lines (42 loc) · 1.31 KB
/
check_pr.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
on:
pull_request:
branches:
- main
name: check PR
jobs:
build:
runs-on: macOS-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup R
uses: r-lib/actions/setup-r@master
- name: Install pandoc and pandoc citeproc
run: |
brew install pandoc
- name: Cache Renv packages
uses: actions/cache@v1
with:
path: $HOME/.local/share/renv
key: r-${{ hashFiles('renv.lock') }}
restore-keys: r-
- name: Cache bookdown results
uses: actions/cache@v1
with:
path: _bookdown_files
key: bookdown-${{ hashFiles('**/*Rmd') }}
restore-keys: bookdown-
- name: Install packages
run: |
R -e 'install.packages("renv")'
R -e 'install.packages("bookdown")'
R -e 'install.packages("ggplot2")'
R -e 'install.packages("svglite")'
R -e 'install.packages("dplyr")'
R -e 'install.packages("kableExtra")'
R -e 'install.packages("corrplot")'
R -e 'install.packages("tidyr")'
R -e 'install.packages("reshape2")'
R -e 'renv::restore()'
- name: Build site
run: Rscript -e 'bookdown::render_book("index.Rmd", quiet = TRUE)'