Generate diagram workflow - closes #1244 #5
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Render Mermaid Diagrams | |
| on: | |
| push: | |
| paths: | |
| - 'docs/*.mmd' # Trigger only when mermaid files change | |
| jobs: | |
| render: | |
| runs-on: ubuntu-latest | |
| # Grant the action permission to write to the repository | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Mermaid CLI | |
| run: npm install -g @mermaid-js/mermaid-cli | |
| - name: Render Diagram | |
| run: mmdc -p docs/puppeteer-config.json -i docs/architecture.mmd -o docs/images/architecture.svg -t neutral | |
| - name: Commit and Push | |
| run: | | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "GitHub Action" | |
| git add docs/images/architecture.svg | |
| git commit -m "docs: update rendered mermaid diagram" || exit 0 | |
| git push |