Skip to content

Commit 0de205f

Browse files
committed
deploy/ci: pre-render the Graphviz diagrams
This avoids the 1.4MB download on the client-side, in favor of inlined, small SVG elements. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent d04135c commit 0de205f

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.github/actions/deploy-to-github-pages/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ runs:
8181
find public/book public/docs -name \*.html -print0 |
8282
xargs -0r sed -i 's,http://git-scm\.com,https://git-scm.com,g'
8383
84+
- uses: actions/setup-node@v5
85+
- name: pre-render the Graphviz diagrams
86+
shell: bash
87+
run: |
88+
npm install node-html-parser &&
89+
node ./script/graphviz-ssr.js
90+
8491
- name: run Pagefind ${{ env.PAGEFIND_VERSION }} to build the search index
8592
shell: bash
8693
run: npx -y pagefind@${{ env.PAGEFIND_VERSION }} --site public --write-playground

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ jobs:
3232
exit 1
3333
fi
3434
35+
- uses: actions/setup-node@v5
36+
- name: pre-render the Graphviz diagrams
37+
run: |
38+
npm install node-html-parser &&
39+
node ./script/graphviz-ssr.js
40+
3541
- name: run Pagefind ${{ env.PAGEFIND_VERSION }} to build the search index
3642
run: npx -y pagefind@${{ env.PAGEFIND_VERSION }} --site public --write-playground
3743

0 commit comments

Comments
 (0)