Created
March 3, 2022 00:14
-
-
Save miclgael/150ee45c7c216a5bbd27dd808657d004 to your computer and use it in GitHub Desktop.
Deployment Countdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DEPLOY TO PRODUCTION | |
# READS FROM .env file | |
# e.g. $APP_DEPLOY_HOST | |
# e.g. $APP_DEPLOY_PATH | |
# check for .env | |
if [ -f .env ]; then | |
# Load environment variables | |
export $(cat .env | grep -v '#' | awk '/=/ {print $1}') | |
echo 'Reading vars from .env file' | |
fi | |
for i in {5..0} | |
do | |
clear | |
echo '===========================' | |
echo '🤖 App will be deployed to:' | |
echo $VUE_APP_DEPLOY_PATH_PROD | |
echo '===========================' | |
echo "deploying in... $i (ctrl+c to cancel)" | |
sleep 1 | |
done | |
clear | |
echo '===========================' | |
echo '🤖 Deploying app to: ' | |
echo $VUE_APP_DEPLOY_PATH_PROD | |
echo '===========================' | |
rsync -r --progress --exclude={'.gitignore','index.html'} ./dist/ \ | |
$APP_DEPLOY_HOST:APP_DEPLOY_PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment