I was thinking of writing and pushing to github pages not from command line. I needed some kind of markdown creation tool online. There are many like prose.io, dillinger etc. We can create md files from prose.io and save it to github repo. My blog is hosted on github pages(mseshachalam.github.io).
I set up travis-ci to build the saved markdown from another repo and output the result to my github pages repo and push it. Now i can write a post from prose.
Here is my travis.yml