Last active
August 31, 2020 06:26
-
-
Save trvswgnr/d99c40e26aec3d3144f043c5ca24780c to your computer and use it in GitHub Desktop.
Bash - rsync Deploy Script
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
#!/usr/bin/env bash | |
# NOTE: this file needs to have write and execute permissions (chmod u+x ./deploy.sh) | |
set -e | |
DEV_PATH="/home/wpe-user/sites/corpmember3/wp-content" | |
PRO_PATH="/home/wpe-user/sites/corpmember/wp-content" | |
DEV_SSH="corpmember3@corpmember3.ssh.wpengine.net" | |
PRO_SSH="corpmember@corpmember.ssh.wpengine.net" | |
DEPLOY_IGNORE="./.deployignore" | |
DEPLOY_PATH=$DEV_PATH | |
SSH_LOGIN=$DEV_SSH | |
if [ $TRAVIS_BRANCH = "master" ]; then | |
DEPLOY_PATH=$PRO_PATH | |
SSH_LOGIN=$PRO_SSH | |
fi | |
rsync -r --delete-after --quiet $TRAVIS_BUILD_DIR/NLI-membership-childtheme --exclude-from=$DEPLOY_IGNORE $SSH_LOGIN:$DEPLOY_PATH/themes/test/NLI-membership-childtheme | |
rsync -r --delete-after --quiet $TRAVIS_BUILD_DIR/nli-membership_site --exclude-from=$DEPLOY_IGNORE $SSH_LOGIN:$DEPLOY_PATH/plugins/test/nli-membership_site | |
rsync -r --delete-after --quiet $TRAVIS_BUILD_DIR/nli-membership_site_materials-library --exclude-from=$DEPLOY_IGNORE $SSH_LOGIN:$DEPLOY_PATH/plugins/test/nli-membership_site_materials-library |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment