Skip to content

Render README

Render README #6

on: workflow_dispatch
name: Render README
jobs:
render:
name: Render README
runs-on: macOS-12
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
- name: Install rmarkdown, remotes, and the local package
run: |
install.packages('remotes')
remotes::install_cran('rmarkdown')
remotes::install_cran('desc')
remotes::install_local('.')
shell: Rscript {0}
- name: Render README
run: rmarkdown::render("README.Rmd")
shell: Rscript {0}
- name: Commit results
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git commit README.md -m 'Re-build README.Rmd' || echo "No changes to commit"
git push origin || echo "No changes to commit"