This old Science paper, among others, explains well how any public disclosure precludes patentability. How does this equation change if I file a provisional first, then publish the invention in a peer reviewed journal? Will that affect a regular patent app, based on the provisional?
A provisional (or a non provisional) allows you to claim priority to it. That means, any application validly claiming priority in the period of one year after the filing will be assumed to have the same filing date as the priority document.
(I'm talking about a first and second application, if you want to claim priority to an application that is already claiming priority to another application stuff becomes more complicated, but that wasn't part of the question, so this is just a side note).
That does mean that anything published after the first application won't be prior art for the second one. Unless - and this is a big one - the first application isn't the same as the second. While in the US there is at least some margin, in the EU, and if you want to make sure, in the US too, the second application should be exactly the same as the first one, maybe apart from the claims, but even those need to have a solid, for the EU literal, basis in the first description.
Which leads to a question. Why file a provisional? You could just as well file a non provisional. The biggest advantage of a provisional is that it's easier and cheaper to file and later add a non provisional with more information. But that partial priority that this way gets you might (probably will) not be enough to fight against your publication.
Therefore, be it a provisional or not, make sure it's a good application because once the invention is published, it's to late to change the application. (In only the US there is a grace period for own publications, but that shouldn't be used if protection outside the US is needed/wanted.