We have a few workflows at work that use the confluence api to publish pages with dynamic content. It's not super convenient, but was easy enough to set up.
We're not using diagram-as-code though. Most of our diagrams are embedded into the confluence page or copied from somewhere else.