-
Notifications
You must be signed in to change notification settings - Fork 0
22 lines (22 loc) · 878 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
name: Render and Deploy RMarkdown Website
'on': push
jobs:
build:
runs-on: ubuntu-18.04
steps:
- name: Checkout Repository
uses: actions/checkout@master
- name: Install Package Dependencies
run: |-
Rscript -e "install.packages('remotes', repos = 'https://demo.rstudiopm.com/all/__linux__/bionic/latest')"
Rscript -e "remotes::install_deps(dependencies = TRUE, repos = 'https://demo.rstudiopm.com/all/__linux__/bionic/latest')"
- run: |-
Rscript -e "deploy_path <- rmarkdown::render_site(encoding = 'UTF-8')"
Rscript -e "Sys.setenv(DEPLOY_PATH = '_site/')"
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/master'
uses: maxheld83/ghpages@v0.2.0
env:
BUILD_DIR: _site/
GH_PAT: ${{ secrets.GH_PAT }}
container: rocker/verse:latest