ci: improve gcp deploy pipe

This commit is contained in:
Aaron Yarborough 2024-03-13 11:45:44 +00:00
parent f5b6cbb1a7
commit 0abbf73c91

View file

@ -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"