RManualGeneration #132
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
# This workflow will autogenerate a manual for usage of Rsirius | |
# For more information see: https://cran.r-project.org/web/packages/roxygen2/vignettes/roxygen2.html | |
name: RManualGeneration | |
on: [workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
r-version: ["4.4.0"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up R ${{ matrix.r-version }} | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.r-version }} | |
- name: Install libcurl4 | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y libcurl4-openssl-dev | |
- name: Install curl | |
run: install.packages("curl") | |
shell: Rscript {0} | |
- name: Install httr2 | |
run: install.packages("httr2") | |
shell: Rscript {0} | |
- name: Install jsonlite | |
run: install.packages("jsonlite") | |
shell: Rscript {0} | |
- name: Install base64enc | |
run: install.packages("base64enc") | |
shell: Rscript {0} | |
- name: Install remotes | |
run: install.packages("remotes") | |
shell: Rscript {0} | |
- name: Extract RoxygenNote version | |
id: roxygen_version | |
run: | | |
version=$(grep "^RoxygenNote: " client-api_r/generated/DESCRIPTION | awk '{print $2}') | |
echo "roxygen_note=$version" >> $GITHUB_OUTPUT | |
- name: Install roxygen2 | |
run: remotes::install_version("roxygen2", version = "${{ steps.roxygen_version.outputs.roxygen_note }}") | |
shell: Rscript {0} | |
- name: Generate Rsirius Manual | |
run: roxygen2::roxygenize("client-api_r/generated", roclets = NULL, load_code = NULL, clean = TRUE) | |
shell: Rscript {0} | |
- name: update files and push to remote | |
uses: stefanzweifel/git-auto-commit-action@v4.15.2 | |
with: | |
commit_message: Auto-Generated RSirius Manual |