-
Notifications
You must be signed in to change notification settings - Fork 39
27 lines (27 loc) · 1013 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
23
24
25
26
27
name: Render and Deploy RMarkdown Website
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
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')"
- name: Render Site
run: |-
Rscript -e "rmarkdown::render('thesis/myThesis_Revised.Rmd')"
echo "::set-env name=DEPLOY_PATH::$(Rscript -e "cat(rmarkdown::site_config()[['output_dir']])")"
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/master'
uses: maxheld83/ghpages@v0.2.0
env:
BUILD_DIR: $DEPLOY_PATH
GH_PAT: ${{ secrets.GH_PAT }}
container: rocker/verse:latest