-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (39 loc) · 1.11 KB
/
render.yml
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
39
40
41
42
43
44
45
46
47
name: Render
on:
push:
branches: ["image"]
permissions:
actions: write
contents: write
jobs:
render:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v4
- name: Convert diagram to svg
uses: rlespinasse/drawio-export-action@v2
with:
format: svg
path: diagram
output: render
remove-page-suffix: true
- name: Convert waveform to svg
run: |
npm i wavedrom-cli -g
mkdir -p waveform/render
for file in waveform/*.json5; do
wavedrom-cli -i $file -s waveform/render/$(basename $file .json5).svg
done
- name: Upload svg
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add diagram/render/*.svg
git add waveform/render/*.svg
git diff-index --quiet HEAD || git commit -m "[bot] render diagrams"
git push