Skip to content

Commit

Permalink
Add GitHub action to re-knit README.rmd whenever changes are pushed t…
Browse files Browse the repository at this point in the history
…o it.
  • Loading branch information
Moohan committed Jul 29, 2021
1 parent 8aa766a commit 7747981
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/render-README.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on:
push:
paths:
- 'README.Rmd'

jobs:
render:
name: Render README
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-pandoc@v1
- name: Install rmarkdown
run: Rscript -e 'install.packages("rmarkdown")'
- name: Render README
run: Rscript -e 'rmarkdown::render("README.Rmd", output_format = "md_document")'
- name: Commit results
run: |
git commit -m 'Re-build README.Rmd' || echo "No changes to commit"
git push origin || echo "No changes to commit"

0 comments on commit 7747981

Please sign in to comment.