Skip to content

Commit a61fa0b

Browse files
authored
Add r-lib/actions/setup-r-dependencies example
So that it is clearer what can be done when R packages are needed in actions
1 parent 15d0c45 commit a61fa0b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

examples/example-03-dependencies.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,22 @@ If you are managing your R package dependencies with `renv`, the following actio
2626

2727
See [the `setup-renv` documentation](https://github.com/r-lib/actions/tree/v2/setup-renv) for how to use `cache-version`.
2828

29+
### Installing R packages manually
30+
31+
You can also use `r-lib/actions/setup-r-dependencies@v2` to install required R packages for your content. See more about
32+
this actions at [the `setup-r-dependencies` documentation](https://github.com/r-lib/actions/tree/v2-branch/setup-r-dependencies).
33+
It can handle dependencies with a `DESCRIPTION` in your project, or you can also list manually what is needed. e.g
34+
35+
```yaml
36+
- uses: r-lib/actions/setup-r-dependencies@v2
37+
with:
38+
packages:
39+
any::knitr
40+
any::rmarkdown
41+
any::downlit
42+
any::xml2
43+
```
44+
2945
## Installing Jupyter
3046

3147
Add the following entry to your GitHub Actions workflow:

0 commit comments

Comments
 (0)