using additional packages for pkgdown articles

Is there a recommended protocol for using packages in pkgdown articles that are not necessary for the package itself (don't show up in DESCRIPTION)? Running locally, everything would be fine, but if you are building with GitHub Actions, those packages would not be available. One option is to add them to Suggests, but even that seems excessive.

You could build the Github Action environment with a renv lock file

1 Like

Are you building the pkgdown website with the GitHub Actions from actions/examples at v2-branch · r-lib/actions · GitHub (that you might have gotten via GitHub Actions setup — github_actions • usethis)?

If so you can use the Config/Needs/website field in DESCRIPTION.
Here is an example, in pkgdown itself pkgdown/DESCRIPTION at 7fe9e802df2964d483d0267f1d5a59aa7b3c685d · r-lib/pkgdown · GitHub

Config/Needs/website: usethis, servr

The idea of custom fields is mentioned in the second edition of the R packages book R Packages (2e) - 10  DESCRIPTION and NAMESPACE

3 Likes

This topic was automatically closed after 45 days. New replies are no longer allowed.


If you have a query related to it or one of the replies, start a new topic and refer back with a link.