Skip to content

Merge pull request #796 from pharmaR/dev #107

Merge pull request #796 from pharmaR/dev

Merge pull request #796 from pharmaR/dev #107

Workflow file for this run

# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
# this is set to re-render whenever README.Rmd is changed on a given branch
# the file is rendered and committed to the same branch
# adapted from: https://github.com/r-lib/actions/tree/v2/examples#render-rmarkdown
on:
push:
paths: ['README.Rmd']
name: render-readme
jobs:
render-rmarkdown:
runs-on: ubuntu-latest
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
# install packages needed
- name: install required packages
run: Rscript -e 'install.packages(c("rmarkdown"))'
- name: Render Rmarkdown files and Commit Results
run: |
Rscript -e 'rmarkdown::render("README.Rmd", output_format = "github_document")'
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git add README.md || echo "WARN: README.md was not updated"
git add man/figures/README-* || echo "No figure updates were found"
git commit -m 'Re-build Rmarkdown files' || echo "No changes to commit"
git push origin || echo "No changes to commit"