Deploys a bundle (tarball) to an Posit Connect server. If not provided,
name
(a unique identifier) will be an auto-generated alphabetic string. If
deploying to an existing endpoint, you can set name
or guid
to the
desired content.
deploy(
connect,
bundle,
name = create_random_name(),
title = name,
guid = NULL,
...,
.pre_deploy = {
}
)
deploy_current(content)
A Connect object
A Bundle object
The unique name for the content on the server
optional The title to be used for the content on the server
optional The GUID if the content already exists on the server
Additional arguments passed along to the content creation
An expression to execute before deploying the new bundle. The variables content
and bundle_id
are supplied
A Content object
Task A task object
This function accepts the same arguments as connectapi::content_update()
.
deploy_current()
is a helper to easily redeploy the currently active bundle
for an existing content item.
connectapi::content_update
Other deployment functions:
bundle_dir()
,
bundle_path()
,
bundle_static()
,
download_bundle()
,
poll_task()
if (FALSE) { # \dontrun{
client <- connect()
# beware bundling big directories, like `renv/`, `data/`, etc.
bnd <- bundle_dir(".")
deploy(client, bnd)
} # }
client <- connect(prefix = "TEST_1")
#> Defining Connect with server: http://localhost:32768
bnd <- bundle_path(system.file("tests/testthat/examples/static.tar.gz", package = "connectapi"))
#> Bundling path
deploy(client, bnd)
#> Getting content endpoint
#>
#> Uploading bundle
#> Warning: 'raw = FALSE' but '/home/runner/work/connectapi/connectapi/docs/reference' is not a regular file
#> Warning: cannot open file '/home/runner/work/connectapi/connectapi/docs/reference': it is a directory
#> Error in file(body$path, "rb"): cannot open the connection