Publish stopped working for one of my sites, but for entirely different reasons than others have discussed here. I used Time Machine to roll back to a recent version of the site, renaming the original folder so I would know not to use it. Coda 2, however, kept pointing to the original (renamed) folder.
So it seems Coda uses a unique ID to identify the local root folder, not a simple file path. This is probably a good idea in most cases—it means if you move or change the name of this folder in the Finder, Coda still knows where it is. But if the actual folder changes (as it will if you recover from a backup), you can expect the unexpected.
I still don't know why the publish feature stopped working with the renamed folder. (In some ways I'm glad it did, as it stopped me publishing from the wrong folder.) All I know is that updating the 'Local Root' of the site fixed the problem.