-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 893 Bytes
/
mermaid.yml
File metadata and controls
38 lines (31 loc) · 893 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
32
33
34
35
36
37
38
name: Mermaid
on:
push:
paths:
- '**.md'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Mermaid CLI
run: npm install -g @mermaid-js/mermaid-cli
- name: Build Mermaid Diagrams
run: |
find . -name "*.md" -type f -exec sh -c '
for file do
mmdc -i "$file" -o "${file%.md}.png"
done
' sh {} +
- name: Commit and Push
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Generate Mermaid diagrams" || echo "No changes to commit"
git push