通过FTP从Bitbucket部署React App到我的服务器

问题描述 投票:-5回答:1

你好我在Bitbucket的管道中设置这个设置。一切都运行良好,但每当我每次承诺Build时它看起来都不是Goode。但是当我没有成功的时候。它告诉我,我需要第一次提交。有人最佳实践/经验吗?

到位桶,pipelines.yml

# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.

pipelines:
  branches:
    production:
      - step:
          name: Build and deploy to FTP
          image: node:11.9.0
          caches:
            - node
          script:
            - npm install
            - npm run build
            - apt-get update 
            - apt-get -qq install git-ftp
            - git add /build
            - git commit -m "Build"
            - git push
            - git ftp push --user $FTP_USERNAME --passwd $FTP_PASSWORD ftp://someurl.com/
            - git rm /build
            - git commit -m "Remove build"
            - git push

reactjs git bitbucket-pipelines
1个回答
0
投票

如果我正确理解您的要求,您将在显示模板示例的页面上,并按“提交文件”按钮。

bitbucket-pipelines.yaml 实际上,你应该做的事情让你感到困惑,但实际上你应该做的是在你的存储库的根目录中有一个名为bitbucket-pipelines.yaml的文件,其中包含你想要的行为,然后,管道将自动完成工作。此文件中的说明。

© www.soinside.com 2019 - 2024. All rights reserved.