Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save prayas-sapkota/52b410df0f6204f3e51e1188561c08c5 to your computer and use it in GitHub Desktop.
Save prayas-sapkota/52b410df0f6204f3e51e1188561c08c5 to your computer and use it in GitHub Desktop.
Bitbucket Pipelines - Deploy via FTP to shared hosting
image: samueldebruyn/debian-git
pipelines:
custom: # Pipelines that are triggered manually
init: # -- First time init
- step:
script:
- apt-get update
- apt-get -qq install git-ftp
- git ftp init --user $FTP_USERNAME --passwd $FTP_PASSWORD ftp://$FTP_HOST
deploy-all: # -- Deploys all files from the selected commit
- step:
script:
- apt-get update
- apt-get -qq install git-ftp
- git ftp push --user $FTP_USERNAME --passwd $FTP_PASSWORD ftp://$FTP_HOST --all
branches: # Automated triggers on commits to branches
master: # -- When committing to mast branch
- step:
script:
- apt-get update
- apt-get -qq install git-ftp
- git ftp push --user $FTP_USERNAME --passwd $FTP_PASSWORD ftp://$FTP_HOST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment