-
-
Save paulborm/d8a2cf8c34a1ed6dda490b3e9e93149d to your computer and use it in GitHub Desktop.
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
DEPLOY_USER="" | |
DEPLOY_HOST="" | |
DEPLOY_HOST_DIR="" | |
DEPLOY_LOCAL_DIR="" | |
DEPLOY_EXCLUDE="" |
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
#!/bin/sh | |
source .env | |
echo "🚀 Deploying to remote server ... \n" | |
# Ref: https://ss64.com/bash/rsync.html | |
rsync -avz --delete --exclude ${DEPLOY_EXCLUDE} ${DEPLOY_LOCAL_DIR} ${DEPLOY_USER}@${DEPLOY_HOST}:~/${DEPLOY_HOST_DIR} | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment