-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (52 loc) · 1.81 KB
/
RManualGeneration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# 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