Skip to content

Commit a2aad48

Browse files
committed
deploy/pr: 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 f84301a commit a2aad48

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ jobs:
4141
HUGO_ENVIRONMENT: production
4242
HUGO_RELATIVEURLS: false
4343
run: hugo config && hugo --minify --baseURL '${{ steps.pages.outputs.base_url }}/'
44+
- uses: actions/setup-node@v5
45+
- name: pre-render the Graphviz diagrams
46+
run: npm ci && node ./script/graphviz-ssr.js
4447
- uses: actions/upload-pages-artifact@v3
4548
with:
4649
path: ./public

.github/workflows/pr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
sudo dpkg -i /tmp/hugo.deb
1818
- name: run Hugo to build the pages
1919
run: hugo
20+
- uses: actions/setup-node@v5
21+
- run: npm ci && node ./script/graphviz-ssr.js
2022
- name: build tar archive
2123
run: cd public && tar czvf ../pages.tar.gz *
2224
- name: Upload build artifact

0 commit comments

Comments
 (0)