Bitbucket管道-无法将dist文件夹部署到我的服务器

时间:2020-10-31 10:54:14

标签: bitbucket bitbucket-pipelines

我正在尝试通过bitbucket管道将wordpress主题部署到服务器,它工作正常,但是没有部署 dist 文件夹。我认为是因为我的.gitignore文件中添加了 dist 文件夹

这是我的bitbucket-pipelines.yml文件

    - step:

        name: 'Deployment to Production'

        image: node:10.16.2

        deployment: production

        trigger: 'manual'

        script:

          - npm install

          - npm test

          - yarn

          - yarn build:production

          - apt-get update

          - apt-get -qq install git-ftp

          - git ftp push --insecure --user $FTP_USER --passwd $FTP_PASS ftpes://ftp.mydomain.dev/public_html/wp-content/themes/cule --all
我错过了什么吗?应该从.gitignore文件中删除dist文件夹吗?

这是我的.gitignore文件

.gitignore

.cache-loader
npm-debug.log
yarn-error.log
resources/assets/config-local.json
node_modules
dist

1 个答案:

答案 0 :(得分:0)

git-ftp将推送.git-ftp-include文件中列出的所有未跟踪的文件和文件夹。已记录在here中。

至少,可以通过在存储库根目录中添加名为dist的文件来配置始终推送.git-ftp-include文件夹,该文件的内容如下:< / p>

!dist/

documentation列出了更多选项,以有条件地更新dist文件夹。