Sync branch gh-pages folder in master

The title of the issue.

In the master there is a folder gh-pages. Using grunt and jekyll to her going to a few static pages. Need to the contents of this folder are automatically loaded in the branch gh-pages with commit in the master. It happens in GitHub for Windows, it is likely, therefore, to implement git hooks I failed. Tried a few recipes from Google earned only this, but there are copied all the files from the master.

Is there a way to organize this cooperation? In the end, after grunt has to gather itself for a javascript library, and the documentation and demos that use this library.
October 3rd 19 at 03:08
3 answers
October 3rd 19 at 03:10
October 3rd 19 at 03:12
After some time I can say that does not always work and sometimes stops working at all (for operations more complex than just commits). Stable way can call the contents of individual folders with gh-pages and manual updates. Another method is to set the gh-bages as the main branch on Github it is possible. Of the minuses — the root directory is littered with html files and their parts.
October 3rd 19 at 03:14

Find more questions by tags GitCVSGitHub