Nightly Knit README.Rmd #14
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
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
name: Nightly Knit README.Rmd | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
- name: Install README.Rmd dependencies | |
run: | | |
Rscript -e 'install.packages(c("pak", "rmarkdown", "knitr"))' | |
- name: Install the local package | |
run: | | |
Rscript -e 'pak::local_install(".")' | |
- name: Render README.Rmd file and Commit Results | |
run: | | |
Rscript -e 'rmarkdown::render("README.Rmd")' | |
git config --local user.name "$GITHUB_ACTOR" | |
git config --local user.email "[email protected]" | |
git commit README.* -m 'Re-build Rmarkdown files' || echo "No changes to commit" | |
git push origin || echo "No changes to commit" |