Skip to content

render-rmarkdown

render-rmarkdown #244

# 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:
paths: ['**.Rmd']
schedule:
- cron: "30 1 * * *"
workflow_dispatch:
name: render-rmarkdown
jobs:
render-rmarkdown:
runs-on: windows-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: "renv"
- uses: r-lib/actions/setup-renv@v2
- name: Render my document to dashboard
run: Rscript -e "rmarkdown::render('index.Rmd')"
- name: Commit results
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Actions [Bot]"
git add .
git commit -m 'Re-build index' || echo "No changes to commit"
git push origin || echo "No changes to commit"