Skip to content

Commit

Permalink
Clean up testing functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherMarais committed Feb 25, 2024
1 parent 91303d0 commit daf79af
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
24 changes: 0 additions & 24 deletions 05_DASHBOARD/deploy-dev.R
Original file line number Diff line number Diff line change
@@ -1,37 +1,13 @@
# Load the rsconnect package
library(rsconnect)

# a function to list all files in a directory and its subdirectories
list_all_files <- function(directories) {
all_files <- c() # Initialize an empty vector to store all file paths

# Loop through each directory provided
for (dir in directories) {
if (!dir.exists(dir)) {
next # Skip if directory does not exist
}

# Use list.files to recursively list all files in the directory and its subdirectories
# full.names = TRUE returns the full paths, which is what we want
files <- list.files(dir, recursive = TRUE, full.names = TRUE)

# Append the files found to the all_files vector
all_files <- c(all_files, files)
}

return(all_files)
}

# Authenticate
rsconnect::setAccountInfo(
name = Sys.getenv("SHINY_ACC_NAME"),
token = Sys.getenv("SHINY_TOKEN"),
secret = Sys.getenv("SHINY_SECRET"))

# Deploy
req_files <- list_all_files(c("./04_Tests", "./03_Data_for_app")) # get all the required files
rsconnect::deployApp(
# appDir = "./05_DASHBOARD",
# appFiles = c("app.R", req_files),
appName = "Dashboard-dev",
forceUpdate = TRUE)
2 changes: 0 additions & 2 deletions 05_DASHBOARD/deploy.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,5 @@ rsconnect::setAccountInfo(

# Deploy
rsconnect::deployApp(
# appDir = "./05_DASHBOARD",
# appFiles = "app.R",
appName = "Dashboard",
forceUpdate = TRUE)

0 comments on commit daf79af

Please sign in to comment.