18 lines
643 B
Bash
18 lines
643 B
Bash
#!/bin/bash
|
|
# Author: Ben&Jamyn
|
|
# Date: 21/01/2021
|
|
|
|
PROJ_DIR="/home/dev/MigratorProject-frontend"
|
|
DEPLOY_PATH="/home/mxpoopzxzx"
|
|
|
|
echo "Removing old build files"
|
|
# Remove old build files
|
|
rm -rf $PROJ_DIR/build*
|
|
|
|
echo "Building site and creating zip"
|
|
# Build the site and zip it with the .htaccess
|
|
npm run-script build && cd build && zip -r $PROJ_DIR/build.zip * && \
|
|
zip -r $PROJ_DIR/build.zip .htaccess* && echo "Successfully built" || echo "Build Failed"
|
|
|
|
scp -P 2683 $PROJ_DIR/build.zip mxpoopzxzx@s02cd.syd6.hostingplatform.net.au:$DEPLOY_PATH
|
|
ssh -p 2683 mxpoopzxzx@s02cd.syd6.hostingplatform.net.au "bash $DEPLOY_PATH/deploy-tracker.sh" |