I have generated documentation from javadoc in a /docs
directory in the working directory of my git project.
I would like to make this documentation available at github.io
by committing it to the gh-pages
branch of my repository (this will make it automatically available at http://username.github.io/projectname
).
Not sure how to go about it, though. If I switch to gh-pages
by using git checkout
, all the contents of my working directory will be switched to the contents of the gh-pages
, right? This will remove the /docs
directory from it.
I could make a copy of /docs
somewhere else and copy it to the working directory after switching to gh-pages, but does that mean I will have to go over this manual process of copying /docs
, switching branches, copying again, committing, switching back to master
branch, every time I want to update the documentation? I assume there is a better solution, but I don't know what it might be.