render-rmarkdown #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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@v3 | |
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 | |
- name: Render my document to dashboard | |
run: Rscript -e "rmarkdown::render('index.Rmd')" | |
- name: Commit results | |
run: | | |
git config --global user.email "zehuiyin@gmail.com" | |
git config --global user.name "Zehui Yin" | |
git add . | |
git commit -m 'Re-build index' || echo "No changes to commit" | |
git push origin || echo "No changes to commit" |