【问题标题】:Bitbucket pipeline - Unable to deploy dist folder to my serverBitbucket 管道 - 无法将 dist 文件夹部署到我的服务器
【发布时间】:2020-10-31 10:54:14
【问题描述】:

我正在尝试通过 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

【问题讨论】:

    标签: bitbucket bitbucket-pipelines


    【解决方案1】:

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

    至少,您的存储库可以配置为始终通过在存储库根目录添加一个名为 .git-ftp-include 的文件并包含以下内容来推送dist 文件夹:

    !dist/
    

    documentation 包含更多选项来有条件地更新 dist 文件夹。

    【讨论】:

      猜你喜欢
      • 2018-10-11
      • 1970-01-01
      • 2021-07-12
      • 1970-01-01
      • 2017-05-21
      • 2017-10-17
      • 1970-01-01
      • 2018-05-17
      • 1970-01-01
      相关资源
      最近更新 更多