image: samueldebruyn/debian-git

pipelines:
  custom: # Pipelines that are triggered manually via the Bitbucket GUI
    init: # -- First time init
    - step:
        script:
          - apt-get update
          - apt-get -qq install git-ftp
          - git ftp push -v --insecure --user $FTP_USERNAME --passwd $FTP_PASSWORD ftps://165.227.1.207:22/public_html/wp-content/plugins/caddy/
  branches:
    master:
      - step:
          deployment: staging
          script:
            - apt-get update
            - apt-get -qq install git-ftp
            - git ftp push -v --insecure --user $FTP_USERNAME --passwd $FTP_PASSWORD ftps://165.227.1.207:22/public_html/wp-content/plugins/caddy/
    tcbstaging:
      - step:
          script:
            - apt-get update
            - apt-get -qq install git-ftp
            - git ftp push -v --insecure --user $FTP_TCBS_USERNAME --passwd $FTP_TCBS_PASSWORD ftps://138.68.228.23:22/~/public_html/wp-content/plugins/caddy/