-
Notifications
You must be signed in to change notification settings - Fork 53
31 lines (27 loc) · 882 Bytes
/
diagram.yml
File metadata and controls
31 lines (27 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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@v6
- name: Install Mermaid CLI
run: npm install -g @mermaid-js/mermaid-cli
- name: Render Diagrams
run: |
for file in docs/*.mmd; do
base="$(basename "${file}" .mmd)"
mmdc -p docs/puppeteer-config.json -i "${file}" -o "docs/images/${base}.svg" -t neutral
done
- name: Commit and Push
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "docs: update rendered mermaid diagram [skip ci]"
file_pattern: 'docs/images/*.svg'