Skip to content

Commit f6f6e09

Browse files
committed
Create github workflow to export drawio files to SVG to have README docs in sync with current design.
1 parent ab60a32 commit f6f6e09

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Export Draw.io Diagrams
2+
3+
on:
4+
push:
5+
paths:
6+
- 'docs/diagrams/*.drawio'
7+
- '.github/workflows/drawio-export.yml'
8+
workflow_dispatch: # Allow manual trigger
9+
10+
jobs:
11+
export-diagrams:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0 # Full history for proper commits
19+
20+
- name: Export Draw.io files to SVG
21+
uses: rlespinasse/drawio-export-action@v2
22+
with:
23+
path: docs/diagrams
24+
format: svg
25+
transparent: true
26+
27+
- name: Commit exported SVGs
28+
run: |
29+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
30+
git config --local user.name "github-actions[bot]"
31+
git add docs/diagrams/*.svg
32+
git diff --staged --quiet || git commit -m "Update exported diagrams [skip ci]"
33+
34+
- name: Push changes
35+
uses: ad-m/github-push-action@master
36+
with:
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
branch: ${{ github.ref }}

0 commit comments

Comments
 (0)