Skip to content

Merge pull request #114 from COMPASS-DOE/wot #69

Merge pull request #114 from COMPASS-DOE/wot

Merge pull request #114 from COMPASS-DOE/wot #69

on:
push:
paths:
- '**.Rmd'
name: Render Rmarkdown files
jobs:
render:
name: Render Rmarkdown files
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- name: Install needed packages
run: |
install.packages(c("remotes", "readr", "lubridate", "dplyr", "readr", "tidyr", "ggplot2", "plotly", "kableExtra", "skimr", "Kendall", "DT"))
remotes::install_cran("rmarkdown")
shell: Rscript {0}
- name: Render Rmarkdown files
run: |
RMD_PATH=($(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '[.]Rmd$'))
Rscript -e 'for (f in commandArgs(TRUE)) if (file.exists(f)) rmarkdown::render(f)' ${RMD_PATH[*]}