-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path03_deploy.R
60 lines (51 loc) · 1.57 KB
/
03_deploy.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Building a Prod-Ready, Robust Shiny Application.
#
# README: each step of the dev files is optional, and you don't have to
# fill every dev scripts before getting started.
# 01_start.R should be filled at start.
# 02_dev.R should be used to keep track of your development during the project.
# 03_deploy.R should be used once you need to deploy your app.
#
#
######################################
#### CURRENT FILE: DEPLOY SCRIPT #####
######################################
# Test your app
## Run checks ----
## Check the package before sending to prod
devtools::check()
# rhub::check_for_cran()
# Deploy
## Local, CRAN or Package Manager ----
## This will build a tar.gz that can be installed locally,
## sent to CRAN, or to a package manager
devtools::build()
## RStudio ----
## If you want to deploy on RStudio related platforms
# golem::add_rstudioconnect_file()
golem::add_shinyappsio_file()
# golem::add_shinyserver_file()
## Docker ----
## If you want to deploy via a generic Dockerfile
# golem::add_dockerfile_with_renv()
golem::add_dockerfile()
## If you want to deploy to ShinyProxy
# golem::add_dockerfile_with_renv_shinyproxy()
# Deploy to Posit Connect or ShinyApps.io
# In command line.
# rsconnect::deployApp(
# appName = desc::desc_get_field("Package"),
# appTitle = desc::desc_get_field("Package"),
# appFiles = c(
# # Add any additional files unique to your app here.
# "R/",
# "inst/",
# "data/",
# "NAMESPACE",
# "DESCRIPTION",
# "app.R"
# ),
# appId = rsconnect::deployments(".")$appID,
# lint = FALSE,
# forceUpdate = TRUE
# )