Last active
December 17, 2019 01:36
-
-
Save heshanh/2d206e29bb143cb90476dbe80b7d403c to your computer and use it in GitHub Desktop.
Codeship S/FTP deployment to Cpanel Server (not safe)
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 IS NOT A SAFE WAY TO DEPLOY AS FTP PASSWORD/USERBANE IS EXPOSED. USE THIS IF THERE IS NO OTHER WAY | |
# | |
#Deploys code to cpanel | |
sshpass -p 'PASSWORD' rsync --progress -avz -e "ssh" ~/clone/ FTPUSER@HOST/IP:/home/webroot | |
# | |
#runs compsoer on bedrock and sage | |
sshpass -p 'PASSWORD' "ssh" FTPUSER@HOST/IP "cd webroot && /opt/cpanel/ea-php73/root/usr/bin/php /opt/cpanel/composer/bin/composer install && cd /home/webroot/web/app/themes/theme-dir && /opt/cpanel/ea-php73/root/usr/bin/php /opt/cpanel/composer/bin/composer install" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment