Lorenzo additions #328
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
# The purpose of this action is to run `document()` of the roxygen2 package on each commit. | |
# If new documentation was generated, it will automatically add a commit to the current branch. | |
# This has the same effect as running `document()` locally, but | |
# * ensures it cannot be forgotten | |
# * saves setting up the development environment locally, which is especially useful for new contributors. | |
# | |
# 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: | |
pull_request: | |
paths: ["R/**", ".github/workflows"] | |
name: Document | |
jobs: | |
document: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# extra token required to trigger github actions again on commit | |
token: ${{ secrets.BOT_GH_TOKEN }} | |
- name: Update system dependencies | |
# due to recent versions of GLIBC missing | |
run: | | |
sudo apt-get update && sudo apt-get install cmake libstdc++6 \ | |
libcurl4-openssl-dev libssl-dev libxml2-dev libfontconfig1-dev \ | |
libharfbuzz-dev libfribidi-dev \ | |
libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev -y \ | |
pandoc pandoc-citeproc | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Install pak | |
run: Rscript -e "install.packages('pak', repos='https://cran.rstudio.com/')" | |
- name: Install reticulate | |
run: Rscript -e "install.packages('reticulate', repos='https://cran.rstudio.com/', version = '1.35.0')" | |
- name: Install dependencies | |
uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: any::roxygen2 | |
needs: roxygen2 | |
- name: Document | |
run: roxygen2::roxygenise() | |
shell: Rscript {0} | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Roxygenize |