mattdesl / ideas

brainstorming / ideas
MIT License
27 stars 0 forks source link

ghpages deploy tool #6

Closed mattdesl closed 9 years ago

mattdesl commented 9 years ago

gh-pages branch is often kinda annoying to deal with. e.g. forgetting to merge with master, accidentally committing to gh-pages instead of master, etc.

one solution is to mirror master to gh-pages but then you end up committing bundle/release assets which is no good.

another is a shell alias like so:

git checkout gh-pages \
  && git merge master \
  && npm run build \
  && git add . \
  && git commit -m 'build' \
  && git push origin gh-pages \
  && git checkout master 

but it does not handle cases where there is a merge conflict (pretty rare). maybe a tool like ghrepo could ease the work involved here.

stoeffel commented 9 years ago

this often works out nicely (just pushing a dist or docs folder to the gh-pages branch)

ungoldman commented 9 years ago

@meandavejustice wrote a module to automate this process a bit:

https://www.npmjs.com/package/gh-pages-deploy https://github.com/meandavejustice/gh-pages-deploy

mattdesl commented 9 years ago

This now handles my most common case: https://github.com/mattdesl/ghpages