Skip to content

Commit 0b34d58

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 30f377d commit 0b34d58

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

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ jobs:
3939
exit 1
4040
fi
4141
42+
- uses: actions/setup-node@v5
43+
- name: pre-render the Graphviz diagrams
44+
run: |
45+
npm install node-html-parser &&
46+
node ./script/graphviz-ssr.js
47+
4248
- name: run Pagefind ${{ env.PAGEFIND_VERSION }} to build the search index
4349
run: npx -y pagefind@${{ env.PAGEFIND_VERSION }} --site public
4450

0 commit comments

Comments
 (0)