I like Yesod so far. It feels like a real framework that can make real pages. It was definitely influenced by Rails but one thing it left behind is the creepy Rails magic. Things are explicitly linked together so it makes sense (aside from some of the Haskell constructions which are still foreign to me). Plus these DSLs are startlingly clean. Cabal files are like make meets bundler. Hspec is like rspec without stuttering. But my sycophancy aside, here's how you deploy.
Step 1: a basic Yesod app and local databases
Now edit config/postgresql.yml with the username and databases you created, and remove the production database entry. We'll be reading it from a Heroku environment variable.
Step 2: a new Heroku app and production database
Step 3: have the app ask Heroku for db connection info
Follow these excellent instructions to add the Heroku helper to your app. Two things puzzled me for a while that the article doesn't mention. You need to modify your project .cabal file and add heroku to the end of the build-depends and Helpers.Heroku to the exposed-modules.
Step 4: tell Heroku how to run your app and deploy!
Heroku reads a Procfile to determine how to spawn various types of processes like the web server and workers. Yesod projects come with a Procfile you can copy and modify. It's full of scary comments about the bad old days but you can remove all the comments and keep the last line. So do this:
This is all a one-time thing. The first deploy takes a really long time as it installs all the dependencies. To deploy in the future just do git push heroku master and it's fast and works perfectly.