我通过将提交提交到 生产环境 分支来构建我的Webpack by bitbucket管道:

pipelines:
  default:
    - step:
        name: Build and test JS.
        image: node:8.9.3
        script:
          - npm install
          - npm test
          - npm run-script build
    - step:
        name: Build and test PHP.
        image: php:7-fpm
        script:
          - echo "Here will be the Composer build and PHPUnit tests."          
  branches:
    production:
    - step:
        name: Build and test JS.
        image: node:8.9.3
        script:
          - npm install
          - npm test
          - npm run-script build
        artifacts:
          - dist/**
    - step:
        name: Build and test PHP.
        image: php:7-fpm
        script:
          - echo "Here will be the Composer build and PHPUnit tests."  
        artifacts:
          - dist/**
    - step:
        name: Deploy to FTP.
        image: samueldebruyn/debian-git
        script:
          - apt-get update
          - apt-get -qq install git-ftp
          - ls public_html
          - git ftp push --user $FTP_USERNAME --passwd $FTP_PASSWORD ftp://$FTP_HOST

我看到webpack构建很好,但文件不会进入下一步 . 在 生产环境 构建之后,我应该输出public_html / js和public_html / css以及index.html文件,这些文件应该在git ftp的下一步中可用 . 在“ls public_html”命令之后,该目录中没有这样的文件 . 我也使用.gitignore和.git-ftp-ignore(我允许我的js,css,index.html文件) .

发生了什么,我该如何解决这个问题?请帮忙 .

更新:在npm构建之后列出public_html之后我可以看到构建文件!所以唯一的问题是将它们“发送”到下一步 . UPDATE2:我认为问题是即使我使用.git-ftp-include,ftp-git也没有向服务器发送工件 . 最后“ls public_html”显示所有构建文件 .