The Mermaid Diagrams for Confluence cloudadd-on features a GitHub integration with repository explorer UI. Note that DC version does not have this feature. This allows users to use Mermaid diagrams stored in their GitHub repositories within their Confluence cloud instance.
...
GitHub connection is done in 3 simple steps:
Create add-on Settings Space using the Configuration page.
On the same page, initiate GitHub connection flow(see image below).
Connect your account with the GitHub app and return to Confluence.
...
After successful integration, Mermaid diagrams can be displayed on Confluence pages and blog posts by the add-on.
...