Created
April 20, 2017 01:41
-
-
Save bruskiza/a1631c8cd0b982011dac31b85c545479 to your computer and use it in GitHub Desktop.
Deploy websites using rsync with BitBucket Pipelines
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
# This will rsync the contents of your build directory to the target server | |
image: alpine:latest | |
pipelines: | |
default: | |
- step: | |
script: | |
- apk add --update openssh-client rsync sshpass | |
- chmod -R 755 * | |
- sshpass -p "$FTP_PASSWORD" rsync -v -e "ssh -p $FTP_PORT" -arz --exclude='.git/' * $FTP_USER@$FTP_SERVER:$FTP_PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment