Reputation: 162
With Github pages for users and organizations, everything in the root of the master branch is what gets published. I am using yeoman/grunt to build my site and do not want to push my source files there.
When using something like the webapp
generator, all of the public files are put in a dist
folder.
Is there some way that I can keep all of my source files in a develop
branch and merge the dist
folder into the master
branch and also change the path so that the files are in the root?
UPDATE
When looking up deployment ideas, I just stumbled across a page on the yeoman site itself that talks about this, although it's for project pages and not user/org pages, I may have to modify it some. I will post back after I get it working.
Upvotes: 1
Views: 290
Reputation: 1420
FYI gulp-webapp
has a recipe for this that works great. I switched from a user/org page to a project page to take advantage of it, and realized in doing so I didn't actually need a user/org page at all.
Upvotes: 0
Reputation: 17516
Use git submodule
.
Check the blog for How to generate github pages in a submodule
Upvotes: 1
Reputation: 41934
You can use git filter-branch
:
$ git filter-branch --subdirectory-filter dist/ -f
Upvotes: 1