From 0abbf73c91cab591eab4b498e39e0ca51122883f Mon Sep 17 00:00:00 2001 From: Aaron Yarborough Date: Wed, 13 Mar 2024 11:45:44 +0000 Subject: [PATCH] ci: improve gcp deploy pipe --- util/deploy-gcloud.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/util/deploy-gcloud.sh b/util/deploy-gcloud.sh index ab01e73..80821c2 100755 --- a/util/deploy-gcloud.sh +++ b/util/deploy-gcloud.sh @@ -2,10 +2,11 @@ BUCKET_URL="gs://aaronjy-www" BACKUP_BUCKET_URL="gs://aaronjy-www-backup" echo "------------------------------" -echo "DELETING CURRENT SITE FILES" +echo "BACKUP CURRENT SITE FILES" echo "------------------------------" -gcloud storage rm $BUCKET_URL/** +TIMESTAMP=$(date +%Y-%m-%d_%H:%M:%S) +gcloud transfer jobs create $BUCKET_URL $BACKUP_BUCKET_URL/$(date +%Y-%m-%d_%H:%M:%S)/ --no-async --delete-from=source-after-transfer; echo "------------------------------" echo "REMOVE SENSITIVE FILES"