yq itself able works with YAML, XML, and TOML, and build on top of jq.
So, in case you can in yq/jq syntax and still have not found normal prettier for these file types - here it is.
Also, pre-commit can be simply run in your CI, here are examples for Github Action: usual usage, usage with dirty hack