Skip to content

Commit

Permalink
Turn on deploying targets
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewheiss committed May 30, 2023
1 parent 7e8f17d commit ac83950
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
20 changes: 10 additions & 10 deletions _targets.R
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,17 @@ list(


## Build site ----
tar_quarto(site, path = ".", quiet = FALSE)#,
tar_quarto(site, path = ".", quiet = FALSE),


## Upload site ----
# tar_target(deploy_script, here_rel("deploy.sh"), format = "file"),
# tar_target(deploy_site, {
# # Force dependencies
# site
# # Run the deploy script
# if (Sys.getenv("UPLOAD_WEBSITES") == "TRUE") {
# processx::run(paste0("./", deploy_script))
# }
# })
tar_target(deploy_script, here_rel("deploy.sh"), format = "file"),
tar_target(deploy_site, {
# Force dependencies
site
# Run the deploy script
if (Sys.getenv("UPLOAD_WEBSITES") == "TRUE") {
processx::run(paste0("./", deploy_script))
}
})
)
7 changes: 7 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
REMOTE_HOST="cloud"
REMOTE_DIR="~/sites/datavizs23.classes/public_html"
REMOTE_DEST=$REMOTE_HOST:$REMOTE_DIR

echo "Uploading new changes to remote server..."
echo
rsync -crvP --delete _site/ $REMOTE_DEST

0 comments on commit ac83950

Please sign in to comment.