Push a folder from Bitbucket repo to public server using Pipelines

后端 未结 3 833
长发绾君心
长发绾君心 2021-02-09 13:57

I have pipelines enabled in my Bitbucket repository and I need to run Angular 2 build and deploy the dist folder (which gets created after the build command is executed) in my s

3条回答
  •  孤独总比滥情好
    2021-02-09 14:36

    As I posted in this Github thread, while git-ftp is designed to only deploy tracked file changes, it is actually possible to deploy your entire dist folder on every commit, even if these files are untracked.

    You first need to create a file called .git-ftp-include in the root of your repo, and add a single line with the path to your dist folder, ensuring you add ! to the start of the line:

    !.vuepress/dist/
    

    Then run the following command:

    git ftp push --all --syncroot .vuepress/dist/
    

    The --all uploads ALL your files (even unchanged ones), while --syncroot only uploads the files within the specified folder (uploading them to the root folder).

提交回复
热议问题