image: atlassian/default-image:3

pipelines:
  branches:
    master:
      - step:
          name: Deploy via FTP (only upload changed files)
          script:
            - apt-get update && apt-get install -y lftp
            - lftp -e "
                set ssl:verify-certificate no;
                open -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST;
                mirror -R --only-newer --verbose --exclude .git/ --exclude node_modules/ --exclude vendor/ --exclude .env ./ ./;
                quit"