Php Bitbucket管道部署忽略ftp上载的供应商文件夹

Php Bitbucket管道部署忽略ftp上载的供应商文件夹,php,deployment,composer-php,bitbucket,bitbucket-pipelines,Php,Deployment,Composer Php,Bitbucket,Bitbucket Pipelines,我正在尝试使用bitbucket管道部署PHP项目。使用此代码: init: # -- First time init - step: name: build image: php:7.1.1 caches: - composer script: - apt-get update && apt-get install -y unzip - curl -sS https://getc

我正在尝试使用bitbucket管道部署PHP项目。使用此代码:

init: # -- First time init
  - step:
      name: build
      image: php:7.1.1
      caches:
        - composer
      script:
        - apt-get update && apt-get install -y unzip
        - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
        - composer install
        - vendor/bin/phpunit
      artifacts: # defining vendor/ as an artifact
        - vendor/**
  - step:
      image: samueldebruyn/debian-git
      name: deployment
      script:
        - apt-get update
        - apt-get -qq install git-ftp
        - git ftp init -u "$FTP_DEV_USERNAME" -p "$FTP_DEV_PASSWORD" ftp://$FTP_DEV_HOST/$FTP_DEV_FOLDER
但它忽略了供应商文件夹。我假设,工件也会添加此文件夹以进行部署


有什么不对,或者我可以做得更好吗?

发生这种情况是因为您可能有一个
.gitignore
,其中包括
供应商
目录。事实上,这些工件由bitbucket传递到下一步,但被git ftp忽略。为了使用git ftp上传这些文件,您需要创建一个名为
的文件。git ftp包含
,您需要在其中添加以下行:
!供应商/
是必需的,如中所述:

.git ftp include文件指定git ftp应该包含的故意未跟踪的文件 上传。如果你有一个文件,应该总是上传,添加一行开始! 后跟文件名