The combination of Github + markdown for writing a (technical) book is exactly what https://leanpub.com/ is all about, check it out. (Or, instead of writing markdown on Github, you can upload your markdown files to Dropbox which is then synced with Leanpub). Leanpub also enables you to publish a book and ask for money while you're writing it.
I've chosen Leanpub as the publishing platform for my first book. They only ask for 10% + 50c royalties and there iz zero lock-in with them.