File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 }}
You can’t perform that action at this time.
0 commit comments