Hacker News new | ask | show | jobs
by fuzionmonkey 3586 days ago
For generated HTML docs or websites, this is still not ideal because you have to commit generated code into your master branch.

You can even use Travis to automatically generate and deploy your docs/website, which I find much cleaner and convenient than manually publishing or committing generated code.

https://github.com/L33T-KR3W/push-dir makes it easy to publish a directory to gh-pages (even .gitignored directories i.e. build/).

2 comments

Agreed. I use https://readthedocs.org to take care of building and hosting documentation, and it's really handy.
The generated code is going to be "committed" somewhere, so I am not sure this is much of a down side. I suppose one might worry about storing too much history. Is there a way to pair down history for everything in docs/ ?
Slightly related, I push my site's generated code from the `public` directory of my repo directly to the `gh-pages` branch using git's subtree push:

  $ git subtree push --prefix=public origin gh-pages