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
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).