args <- commandArgs(trailingOnly = TRUE)
deploy_app <- FALSE
# Update global_data
usethis::ui_todo("Checking update for latest_14 dataset...")
source("data-raw/latest_14.R")
if(deploy_app) {
remotes::install_deps(
dependencies = TRUE,
upgrade = "never",
repos = "https://packagemanager.rstudio.com/all/__linux__/bionic/latest"
)
rsconnect::setAccountInfo(
name = 'apmuhamilton',
token = args[1],
secret= args[2]
)
files <- list.files('.')
files <- files[files != 'data-raw']
rsconnect::deployApp(
appFiles = files,
appName = 'hamiltonHowlong',
forceUpdate = TRUE,
account = 'apmuhamilton'
)
} else {
message("Nothing to deploy.")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.