Edit: One reason why I picked PDF is that I expect the readers to actually follow the examples in their own terminal while going through the book. So in that sense I was thinking about reading it on the desktop.
Also, a TOC and sample chapter would be great. A lot more people will be likely to pay if they know what they're getting.
I added links to example pages (which include TOC) to the Gumroad page and here, but yeah I should have put it on the homepage.
Amazon makes it quite easy to publish books that get printed on demand, and they accept pdf files as inputs.
If you make changes, you just upload a new template and you’re all set.
When I made my purchase, the options were Download and Send to Kindle. It's not ePub, but it's something.