You have to set your environment variables in the environment. If you are developing locally you do this by executing:
Sys.setenv("CONNECT_SERVER" = "XXXXX")
Sys.setenv("CONNECT_API_KEY" = "XXXXX")
Then you need to install the renv
package and restore the snapshot so that you have all of the packages you need available.
install.packages("renv")
renv::restore()
When you are publishing the pipeline to RStudio Connect, you deploy the content and the necessary environment variables will be in the environment without any human intervention.
The driver.Rmd
file drives the whole infrastructure build. One you knit that document the pipeline gets built. This file will generate an HTML report that is uploaded to RStudio Connect.
driver.Rmd
executes the pipeline and acts as the parent environment_targets.R
lays down the pipeline and the settings for itreport/report.Rmd
contains the report that will be published to RStudio ConnectR/connect_helpers.R
hosts the function to publish content to RStudio Connectconfig.yml
specifies where to store the cache