Update DESCRIPTION #5
Workflow file for this run
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
# Name of the workflow | |
name: render-readme | |
# Controls when the action will run. Triggers include: | |
# | |
# - button trigger from github action page | |
# - on changes to readme.Rmd | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'README.Rmd' | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
render-readme: | |
runs-on: macos-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout repos | |
uses: actions/checkout@v2 | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v1 | |
- name: Setup pandoc | |
uses: r-lib/actions/setup-pandoc@v1 | |
- name: Install dependencies | |
run: | | |
Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS = "true") | |
options(install.packages.check.source = "no") | |
pkgs <- c("rmarkdown", "remotes") | |
install.packages(pkgs, repos = "https://cloud.r-project.org/") | |
remotes::install_github("epiverse-trace/readepi") | |
shell: Rscript {0} | |
- name: Compile the readme | |
run: | | |
rmarkdown::render("README.Rmd") | |
shell: Rscript {0} | |
- name: Commit files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add README.md | |
git diff-index --quiet HEAD || git commit -m "Automatic readme update" | |
git push origin || echo "No changes to push" |