Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Deploy to Umbler Git
#!/bin/sh
echo "Deploy umbler master"
COMMIT_MSG="$1"
DEPLOY_FOLDER=~/projects/deploy/seusite-com
BUILD_FOLDER=dist
GIT_URL=ssh://ssh-seusite-com@seusite-com.umbler.net:9922/~/git/seusite-com.git
if [[ ! -d $DEPLOY_FOLDER ]]; then
git clone $GIT_URL $DEPLOY_FOLDER
fi
ng build --prod
cp -r $BUILD_FOLDER/* $DEPLOY_FOLDER
cd $DEPLOY_FOLDER
git diff --quiet; NOCHANGES=$?
if [ $NOCHANGES -eq 0 ]; then
echo "no changes"
else
echo "changes"
git add .
git commit -m"$COMMIT_MSG"
git push origin master
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.