Skip to content

Instantly share code, notes, and snippets.

@bruskiza
Created April 20, 2017 01:41
Show Gist options
  • Save bruskiza/a1631c8cd0b982011dac31b85c545479 to your computer and use it in GitHub Desktop.
Save bruskiza/a1631c8cd0b982011dac31b85c545479 to your computer and use it in GitHub Desktop.
Deploy websites using rsync with BitBucket Pipelines
# 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