I came across this wonderful post the other day by Robert Nystrom. It outlines the challenges and tasks he had to accomplish in order to publish his book Game Programming Patterns. This is is a quote from his post:
This gratuitously, vaingloriously long post is about climbing back down the mountain—all of the stuff required to turn a web site into a book. Remember on Mr. Rogers Neighborhood where they would take a trip to a factory to see how cute little piglets are turned into hotdogs or something charming like that? This is like that, but marginally less incarnadine.
For a further discussion surrounding ebook publishing, see the related HN discussion.