philip-gai / github-drawio-demo

Use diagrams.net (draw.io) diagrams in your GitHub markdown files. View diagrams, edit, commit, use PRs and get live updates in your repo.
MIT License
27 stars 8 forks source link

About GitHub <> draw.io #1

Closed philip-gai closed 2 years ago

philip-gai commented 3 years ago

What Is It

  1. Automatically updates draw.io diagrams from links found in markdown or files in the repo

Why

  1. Right now there is no good diagraming integration with GitHub repos / wikis.
  2. This leads to pasting images in repos which loses the original diagram file, or uploading both the image the the diagram file
  3. If the diagram is updated, the image needs to be manually updated as well

How it Works

  1. This will (most likely) be implemented as a GitHub Action app
    1. Free and serverless
  2. The app will scan .md files for a specific markdown comment, and use the link in the info in the comment to retrieve the .drawio file, render the image and place the image back in the .md file
  3. The scan is triggered by commits to the main branch with updates to drawio files

Useful Resources

  1. Action to render an image from a drawio file: https://github.com/severgroup-tt/actions-drawio-cli
philip-gai commented 2 years ago

https://docs.github.com/en/repositories/working-with-files/using-files/working-with-non-code-files

philip-gai commented 2 years ago

Also related: https://github.com/jgraph/drawio-github

philip-gai commented 2 years ago

Closing because this does not need an Action. I just needed to figure out how https://github.com/jgraph/drawio-github actually works 😄