I could not solve this problem so I came up with another solution: -check out a new branch called "source" which is an exact copy of "master".
-deploy the site to branch "gh-pages" with usual gh-pages npm module. (I use npm in my example, but the script is same.)
It is a not a clean solution though. Any feedback is much appreciated.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.