Skip to content

Instantly share code, notes, and snippets.

@StephanWagner
Last active April 29, 2019 20:07
Show Gist options
  • Save StephanWagner/1ded9efdb0df2be27eea883136879ecf to your computer and use it in GitHub Desktop.
Save StephanWagner/1ded9efdb0df2be27eea883136879ecf to your computer and use it in GitHub Desktop.
Deploy websites with Bitbucket pipelines and Git-ftp. More infos here: https://stephanwagner.me/deploy-websites-with-bitbucket-pipelines-and-git-ftp
image: wagnerstephan/bitbucket-git-ftp:latest
pipelines:
custom:
init:
- step:
caches:
- node
script:
- npm install
- npm run gulp
- npm run test
- git reset --hard
- git ftp init -u "$FTP_USERNAME" -p "$FTP_PASSWORD" ftp://$FTP_HOST
deploy:
- step:
caches:
- node
script:
- npm install
- npm run gulp
- npm run test
- git reset --hard
- git ftp push -u "$FTP_USERNAME" -p "$FTP_PASSWORD" ftp://$FTP_HOST --all
branches:
master:
- step:
name: Deploy production
deployment: production
caches:
- node
script:
- npm install
- npm run gulp
- npm run test
- git reset --hard
- git ftp push -u "$FTP_USERNAME" -p "$FTP_PASSWORD" ftp://$FTP_HOST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment