Skip to content

Deploy an R Markdown or quarto website to a server.

Usage

deploySite(
  siteDir = getwd(),
  siteName = NULL,
  siteTitle = NULL,
  account = NULL,
  server = NULL,
  render = c("none", "local", "server"),
  launch.browser = getOption("rsconnect.launch.browser", interactive()),
  logLevel = c("normal", "quiet", "verbose"),
  lint = FALSE,
  metadata = list(),
  python = NULL,
  recordDir = NULL,
  ...
)

Arguments

siteDir

Directory containing website. Defaults to current directory.

siteName

Name for the site (names must be unique within an account). Defaults to the base name of the specified siteDir or to the name provided by a custom site generation function.

siteTitle

Title for the site. For quarto sites only, if not supplied uses the title recorded in _quarto.yml.

account, server

Uniquely identify a remote server with either your user account, the server name, or both. If neither are supplied, and there are multiple options, you'll be prompted to pick one.

Use accounts() to see the full list of available options.

render

Rendering behavior for site:

  • "none" uploads a static version of the current contents of the site directory.

  • "local" renders the site locally then uploads it.

  • "server" uploads the source of the site to render on the server.

Note that for "none" and "local" source files (e.g. .R, .Rmd and .md) will not be uploaded to the server.

launch.browser

If true, the system's default web browser will be launched automatically after the app is started. Defaults to TRUE in interactive sessions only. If a function is passed, it will be called after the app is started, with the app URL as a paramter.

logLevel

One of "quiet", "normal" or "verbose"; indicates how much logging to the console is to be performed. At "quiet" reports no information; at "verbose", a full diagnostic log is captured.

lint

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

metadata

Additional metadata fields to save with the deployment record. These fields will be returned on subsequent calls to deployments().

Multi-value fields are recorded as comma-separated values and returned in that form. Custom value serialization is the responsibility of the caller.

python

Full path to a python binary for use by reticulate. Required if reticulate is a dependency of the app being deployed. If python = NULL, and RETICULATE_PYTHON or RETICULATE_PYTHON_FALLBACK is set in the environment, its value will be used. The specified python binary will be invoked to determine its version and to list the python packages installed in the environment.

recordDir

The default, NULL, uses siteDir.

...

Additional arguments to deployApp(). Do not supply appDir or appFiles; these parameters are automatically generated by deploySite().

See also

Other Deployment functions: applications(), deployAPI(), deployApp(), deployDoc(), deployTFModel()