-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (29 loc) · 959 Bytes
/
render.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
on:
push:
branches: master
name: Render & Deploy Site
jobs:
build:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@master
- uses: r-lib/actions/setup-pandoc@master
- name: Install dependencies
run: |
install.packages("rmarkdown")
install.packages("distill")
install.packages("postcards")
install.packages("devtools")
install.packages("fs")
devtools::install_github("etiennebacher/ebmisc")
shell: Rscript {0}
- name: Render Site
run: Rscript -e 'rmarkdown::render_site(encoding = "UTF-8")'
- name: Copy redirects
run: Rscript -e 'fs::file_copy("_redirects", "_site/_redirects")'
- name: Commit results
run: |
git add -A
git commit -m 'Rebuild site' || echo "No changes to commit"
git push origin || echo "No changes to commit"