Skip to contents

Before using it, please follow these steps :

Usage

deploy_connect_shiny(
  connect_url = Sys.getenv("CONNECT_URL"),
  connect_user = Sys.getenv("CONNECT_USER"),
  connect_api_token = Sys.getenv("CONNECT_TOKEN"),
  app_name = NULL,
  deploy_dir = getwd(),
  connect_name = Sys.getenv("CONNECT_NAME", unset = "connect"),
  file_to_ignore_regex =
    ".Rprofile$|^.Renviron$|renv/|rstudio_.*/|deliverables/|dev/|data-raw/|dockerfiles/",
  forceUpdate = FALSE,
  lint = FALSE,
  ...
)

Arguments

connect_url

URL of the Connect server

connect_user

User name to use to connect to the Connect server

connect_api_token

API token to use to connect to the Connect server

app_name

Name of the app to deploy

deploy_dir

Directory to deploy

connect_name

Name of the Connect server

file_to_ignore_regex

Regex to use to ignore files

forceUpdate

If TRUE, update any previously-deployed app without asking. If FALSE, ask to update. If unset, defaults to the value of getOption("rsconnect.force.update.apps", FALSE).

lint

Lint the project before initiating deployment, to identify potentially problematic code?

...

Other arguments to pass to rsconnect::deployApp

Value

used for side effects

Details

  • Ask the Mission Lead Dev for their deployment token on Connect, this is the one you will need to use.

  • Add the environment variables to your personal ".Renviron" to manually deploy to Connect:

    • Add CONNECT_USER with username.

    • Add CONNECT_TOKEN with the token.

    • Add CONNECT_URL with the connect url

TODO

Examples

if (FALSE) {
deploy_connect_shiny(
  connect_url = Sys.getenv("CONNECT_URL"),
  connect_user = Sys.getenv("CONNECT_USER"),
  connect_api_token = Sys.getenv("CONNECT_TOKEN"),
  app_name = "app_test"
)
}