Bitbucket pipelines sync subfolder/subdirectory, video description YouTube
Git FTP https://github.com/git-ftp/git-ftp
Manual https://github.com/git-ftp/git-ftp/blob/master/man/git-ftp.1.md --syncroot : Specifies a local directory to sync from as if it were the git project root path.
image: php:7.1.24
pipelines:
branches:
master:
- step:
name: Deploy to production
deployment: production
script:
- apt-get update
- apt-get -qq install git-ftp
#- git ftp init --user $FTP_USERNAME_PROD --passwd $FTP_PASSWORD_PROD ftp://ftp.evareynoldsfinearts.com/ --syncroot web #commented out after first deploy
- git ftp push --user $FTP_USERNAME_PROD --passwd $FTP_PASSWORD_PROD ftp://ftp.evareynoldsfinearts.com/ --syncroot web #uncommented out after first deploy
develop:
- step:
name: Deploy to staging
deployment: staging
script:
- apt-get update
- apt-get -qq install git-ftp
#- git ftp init --user $FTP_USERNAME_STAGE --passwd $FTP_PASSWORD_STAGE ftp://ftp.evareynoldsfinearts.com/ --syncroot web #commented out after first deploy
- git ftp push --user $FTP_USERNAME_STAGE --passwd $FTP_PASSWORD_STAGE ftp://ftp.evareynoldsfinearts.com/ --syncroot web #uncommented out after first deploy
Optional ignore file for git-ftp .git-ftp-ignore
bitbucket-pipelines.yml
web/.htaccess.sample
web/wp-config.sample.php