Skip to content

Commit

Permalink
Create render-readme.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Jun 15, 2022
1 parent 84ee53d commit a4f00be
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/render-readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: render-readme

jobs:
render-readme:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-renv@v2

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
deps::.
any::modelbased
- name: Render README
run: Rscript -e 'rmarkdown::render("README.Rmd")'

- name: Commit Results
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git commit -m 'Re-build README.Rmd' || echo "No changes to commit"
git push origin || echo "No changes to commit"

0 comments on commit a4f00be

Please sign in to comment.