Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save atazmin/3995286d0382774f2eac8df70081f2c9 to your computer and use it in GitHub Desktop.
Save atazmin/3995286d0382774f2eac8df70081f2c9 to your computer and use it in GitHub Desktop.

Deploy from Bitbucket to Plesk using Codeship using sshpass and SFTP YouTube

Website root directory

deploy/staging

put -rp /home/rof/clone/web/wp-content/* /staging-domain-name.com/wp-content

deploy/production

put -rp /home/rof/clone/web/wp-content/* /production-domain-name.com/wp-content

Codeship - Custom Script

develop branch

sshpass -p $SFTP_PASSWORD sftp -v -oBatchMode=no -b deploy/staging $SFTP_USER@staging-domain-name.com

master branch

sshpass -p $SFTP_PASSWORD sftp -v -oBatchMode=no -b deploy/production $SFTP_USER@production-domain-name.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment