Skip to content

Render Status

Render Status #347

Workflow file for this run

on:
push:
paths:
- '**.Rmd'
- '.github/workflows/*'
workflow_dispatch:
schedule:
# daily in the morning (hours in UTC), i.e. 07:00
- cron: '1 5 * * 1'
name: Render Status
jobs:
render:
name: Render Status
runs-on: ubuntu-22.04
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2 # This is important to set for `git diff-tree` to work below
- uses: r-lib/actions/setup-r@v2
#with:
# r-version: '4.0.3'
- uses: r-lib/actions/setup-pandoc@v2
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
- name: Install dependencies
run: |
#install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
# options line below specific to linux 22
options(repos = c(REPO_NAME = "https://packagemanager.rstudio.com/all/__linux__/jammy/latest"))
install.packages(c("rmarkdown", "gh", "memoise", "purrr", "dplyr", "tidyr", "glue", "readr"))
shell: Rscript {0}
- name: Render Status Page
run: |
RMD_PATH=$(ls -r *.Rmd)
Rscript -e 'for (file in commandArgs(TRUE)) rmarkdown::render(file)' ${RMD_PATH[*]}
- name: Commit results
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
git commit --all -m "[status] $(date +'%F %T %Z')" || echo "No changes to commit"
git push origin || echo "No changes to commit"