"publishing to IPFS" doesn't make sense in the context of Netlify. Where is the content hosted once the build has been finished? You still need to send the content somewhere once the build is finished, otherwise it won't be available for others to fetch.
> Where is the content hosted once the build has been finished?
There's services like INFURA [0] and Pinata [1] that will pin content for free. It's as simple as using ipfs-deploy [2] to publish the build directory to one of those IPFS pinning services.