Skip to content

Commit ffc1843

Browse files
authored
Use setup-r-dependencies for R package installation
Replaced manual R package installation with setup-r-dependencies action for improved dependency management.
1 parent c00165f commit ffc1843

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/main.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,20 @@ jobs:
3333
'https://cloud.r-project.org'))"
3434
3535
- name: Install R deps (for book building)
36-
run: |
37-
Rscript -e "install.packages('pak', repos = 'https://cloud.r-project.org')"
38-
Rscript -e "pak::pkg_install(c('curl', 'dplyr','formatR', 'spData', 'tidyr', 'kableExtra', 'tinytable', 'webshot'))"
39-
36+
uses: r-lib/actions/setup-r-dependencies@v2
37+
with:
38+
install-quarto: false
39+
cache-version: 2
40+
packages: |
41+
any::curl
42+
any::dplyr
43+
any::formatR
44+
any::spData
45+
any::tidyr
46+
any::kableExtra
47+
any::tinytable
48+
any::webshot
49+
4050
- name: Get Quarto
4151
uses: quarto-dev/quarto-actions/setup@v2
4252
with:

0 commit comments

Comments
 (0)