diff --git a/content/cicdworkflows-minimum/posts/r-cmd-check/r-cmd-check.qmd b/content/cicdworkflows-minimum/posts/r-cmd-check/r-cmd-check.qmd index 8b91330..d40bbc8 100644 --- a/content/cicdworkflows-minimum/posts/r-cmd-check/r-cmd-check.qmd +++ b/content/cicdworkflows-minimum/posts/r-cmd-check/r-cmd-check.qmd @@ -61,4 +61,26 @@ jobs: ## Advanced use -TODO: Add here how to also run against pharmaverse's r-universe latest & the latest release of PPM packages. +### Using other CRAN-like repositories + +To use other CRAN-like repositories in your workflow, you can specify them using the `extra-repositories` option in the workflow file. This is particularly useful if your package depends on packages not available on CRAN or if you want to use the latest versions of packages from a specific repository. + +In the example below, we add two additional repositories: `https://pharmaverse.r-universe.dev/` and `https://insightsengineering.r-universe.dev/`. These repositories are added in a whitespace-separated list to the `extra-repositories` option. This allows `R CMD Check` to access packages from these repositories as well as CRAN. + + +```yaml +name: Run R-CMD-check + +# Specify the event types here + +jobs: + check: + name: Check + uses: phuse-org/devops-toolkit/.github/workflows/R-CMD-check.yml@main + # Use the option to add extra repositories. + # One or more repositories can be added in a whitespace-separated list. + # In the example below, we add https://pharmaverse.r-universe.dev/ and + # https://insightsengineering.r-universe.dev/ as additional repositories. + with: + extra-repositories: "https://pharmaverse.r-universe.dev/ https://insightsengineering.r-universe.dev/" +```