具有共享托管上的位桶管道的Laravel项目

问题描述 投票:0回答:1

我目前在Bitbucket中为我的Laravel项目设置管道(FYI,我对CD / CI完全陌生),该管道应将我最新的master分支版本自动部署到我的网站。因为服务器未安装作曲者,所以我无法安装依赖项或部署项目所需的迁移。

是否可以使用管道来构建整个项目,并使用git-ftp之类的东西将其完全移动到服务器上?在我的bitbucket-pipelines.yml文件下面。

image: php:7.2-fpm

pipelines:
  branches:
    master:
      - step:
        caches:
          - composer
        script:
          - apt-get update && apt-get install -y unzip gnupg ssh
          - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
          - composer install
          - curl -sL https://deb.nodesource.com/setup_8.x | bash -
          - apt-get install -y nodejs
          - npm install
          - npm run production
          - php -r "file_exists('.env') || copy('.env.pipelines', '.env');"
          - composer dump-autoload
          - php artisan key:generate
          - php artisan migrate
          - apt-get -qq install git-ftp
          - git ftp init --user $FTP_USERNAME --passwd $FTP_PASSWORD $FTP_HOST_PATH_P
laravel continuous-integration pipeline continuous-deployment bitbucket-pipelines
1个回答
0
投票
我已跳过管道的使用,并从我的./vendor文件中删除了.gitignore文件夹的排除。我创建了一个具有git支持的子域,从而允许我拉出并部署我的开发分支。对我的生产/主分支进行了相同的操作。
© www.soinside.com 2019 - 2024. All rights reserved.