Skip to content

Commit

Permalink
Use package caching correctly (#263)
Browse files Browse the repository at this point in the history
* Use setup-r-dependencies action

* Fix argument for package installation

See comment r-lib/actions#725 (comment)

* Install any found dependencies with deps::.

* Remove deps::. call

* Use specific versions for ggplot2 and plotly

* Fix syntax
  • Loading branch information
NeuroShepherd authored May 31, 2024
1 parent 9a50f83 commit b96d9bf
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ jobs:
r-version: '4.4.0'

- name: Install R Packages
run: |
installed.packages()
dependencies <- c("rmarkdown", "dplyr", "ggplot2", "plotly", "sessioninfo")
needs_installation <- dependencies[!dependencies %in% installed.packages()]
install.packages(needs_installation)
library("rmarkdown")
shell: Rscript {0}
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 1
packages: |
any::rmarkdown
any::dplyr
[email protected]
[email protected]
any::sessioninfo
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
Expand Down

0 comments on commit b96d9bf

Please sign in to comment.