Skip to content

Instantly share code, notes, and snippets.

@miclgael
Created March 3, 2022 00:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miclgael/150ee45c7c216a5bbd27dd808657d004 to your computer and use it in GitHub Desktop.
Save miclgael/150ee45c7c216a5bbd27dd808657d004 to your computer and use it in GitHub Desktop.
Deployment Countdown
# 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