I have a git repo which contains an AngularJS web app.
It has a subfolder called build, which gets created by a gulp task. I am deploying to Azure, so
You can do this with git submodule or subtree, I use submodule for this kind of reason.
https://git-scm.com/docs/git-submodule
example :
/mainrepository
/mainrepository/subrepository
cd /mainrepository/subrepository;
git init .
cd ../
git submodule add ./subrepository
then open seperate remote repository in bit bucket then
cd into ./subrepository
git remote add origin https://bitbucket.com/path/to/subrepository.git
basically it is all about that.
I have no detailed information about subtrees what I know, it is more advanced than submodules. But if your needs are basically matches with submodules it is easy to maintain.