Skip to content

Instantly share code, notes, and snippets.

@seanghay
Last active February 8, 2018 04:32
Show Gist options
  • Save seanghay/048cf812eab2843a5e6f1c2aa1b9fb7e to your computer and use it in GitHub Desktop.
Save seanghay/048cf812eab2843a5e6f1c2aa1b9fb7e to your computer and use it in GitHub Desktop.
TARGET="/var/www/my-app.com/html"
GIT_DIR="/root/my-app/"
DIST="/root/my-app/dist/browser"
echo "Pulling the project"
cd $GIT_DIR
git pull
echo "Install Packages"
npm i
echo "Building Project"
npm run build
cd $DIST
echo "Removing current website files"
rm -r /var/www/my-app.me/html/*
echo "Copy to the target"
cp -r * $TARGET
echo "Completed Deployment"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment