I have self-published two ebooks on Leanpub [0]. It just great to get you started in self-publishing, because they take multiple input source and output your ebook in PDF, EPUB and MOBI. It used to be for free to create an ebook, but now it costs you $99 to create one. Still, you will get a lot of value out of it.
There are several ways to write your ebook: For instance, I have written mine simply by using markdown, uploading it to GitHub [1] and giving Leanpub access to it as collaborator. That way Leanpub is able to pull the recent manuscript from your repository for a new release or generating a preview. In addition, hosting the manuscript on a public GitHub repository (in case your ebook is open source), gives you the ability to make use of collaborating with others on it. Highly recommended platform!