You should give Leanpub [0] a shot which is a platform for self-publishers. You not only get full-control over the process, but you can also use various input sources and formats (GitHub/Bitbucket, Dropbox, PDF, ...) and output formats (PDF, EPUB, MOBI).
I write all my books with Markdown and Git/GitHub [1] and release them eventually on Leanpub [2]. Even if you don't want to release the book on their platform, you can take away the output files and publish them somewhere else (e.g. own platform, Amazon).
- [0] https://leanpub.com
- [1] https://github.com/the-road-to-learn-react/the-road-to-learn...