image: "bitbucketpipelines/ftp-deploy:0.2.1"
pipelines:
  custom:
    init:
      - step:
          script:
            - pipe: atlassian/ftp-deploy:0.2.1
              variables:
                USER: "$FTP_USERNAME"
                PASSWORD: "$FTP_PASSWORD"
                SERVER: "$FTP_SERVER"
                REMOTE_PATH: '/public_html/pipeline'
                DELETE_FLAG: 'false' # Don't delete existing files
                EXTRA_ARGS: "--exclude=.bitbucket/ --exclude=.git/ --exclude=bitbucket-pipelines.yml --exclude=.gitignore"
  branches:
    desenvolvimento:
      - step:
          script:
            - pipe: atlassian/ftp-deploy:0.2.1
              variables:
                USER: "$FTP_USERNAME"
                PASSWORD: "$FTP_PASSWORD"
                SERVER: "$FTP_SERVER"
                REMOTE_PATH: '/public_html/tema1/wp-content/plugins/altimus'
                DELETE_FLAG: 'false' # Don't delete existing files
                EXTRA_ARGS: "--exclude=.bitbucket/ --exclude=.git/ --exclude=bitbucket-pipelines.yml --exclude=.gitignore"
      - step:
          script:
            - pipe: atlassian/ftp-deploy:0.2.1
              variables:
                USER: "$FTP_USERNAME"
                PASSWORD: "$FTP_PASSWORD"
                SERVER: "$FTP_SERVER"
                REMOTE_PATH: '/public_html/tema2/wp-content/plugins/altimus'
                DELETE_FLAG: 'false' # Don't delete existing files
                EXTRA_ARGS: "--exclude=.bitbucket/ --exclude=.git/ --exclude=bitbucket-pipelines.yml --exclude=.gitignore"
      - step:
          script:
            - pipe: atlassian/ftp-deploy:0.2.1
              variables:
                USER: "$FTP_USERNAME"
                PASSWORD: "$FTP_PASSWORD"
                SERVER: "$FTP_SERVER"
                REMOTE_PATH: '/public_html/tema3/wp-content/plugins/altimus'
                DELETE_FLAG: 'false' # Don't delete existing files
                EXTRA_ARGS: "--exclude=.bitbucket/ --exclude=.git/ --exclude=bitbucket-pipelines.yml --exclude=.gitignore"
