framework docs
Publishing

publish_dir()

Publish a directory to S3

Recursively uploads all files in a directory to S3.

Usage

publish_dir(
  dir,
  dest = NULL,
  connection = NULL,
  pattern = NULL,
  recursive = TRUE
)

Arguments

dir
Character. Local directory path.
dest
Character or NULL. Destination prefix in S3. If NULL, uses the directory name.
connection
Character or NULL. S3 connection name, or NULL for default.
pattern
Character or NULL. Optional regex pattern to filter files.
recursive
Logical. Whether to include subdirectories. Default TRUE.

Value

Character vector. Public URLs of uploaded files.

Examples

if (FALSE) {
# Upload entire directory
publish_dir("outputs/dashboard/")
# Upload to specific location
publish_dir("outputs/dashboard/", dest = "dashboards/v2/")
# Upload only HTML files
publish_dir("outputs/", pattern = "\\.html$")
}