The first step is to create a separate clone of your GitHub repository in a directory next to your primary local repository:
$ pwd
/Users/ksarmalkar/workspace/Android-ViewPagerIndicator
$ cd ..
$ git clone [email protected]:ksarmalkar/Android-ViewPagerIndicator.git Android-ViewPagerIndicator-Pages
$ cd Android-ViewPagerIndicator-Pages
The GitHub Pages web site must be created as a branch named gh-pages in your repository. So lets create this branch and empty it. Refer to the GitHub Pages Manual if you are interested in the exact meaning of these commands.
$ git symbolic-ref HEAD refs/heads/gh-pages
$ rm .git/index
$ git clean -fdx
We will place the Maven repository in a subdirectory of this new branch:
$ mkdir maven
Now Upload your repo to maven/
folder in above case /Users/ksarmalkar/workspace/Android-ViewPagerIndicator-Pages/maven
We also want to have a pretty directory listing. Unfortunately GitHub Pages doesn't have native support for this. So we will create our own directory listing with a simple bash script. Refer update-directory-index.sh. Place this file in /Users/ksarmalkar/workspace/Android-ViewPagerIndicator-Pages/maven
once you uplaod your maven artifacts here run ./update-directory-index.sh
.
Then push all the files in the branch gh-pages
to GitHub.