Skip to content

Commit 4261547

Browse files
committed
ci: fix mermaid diagrams
1 parent 91e5a30 commit 4261547

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/docs.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,18 @@ jobs:
7474
pip install sphinx==${{ matrix.sphinx }} sphinxcontrib-mermaid==${{ matrix.mermaid }} Jinja2==${{ matrix.jinja }}
7575
7676
- name: 🏗 Set up NodeJS
77-
if: matrix.mermaid_fix == 'true' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event.client_payload.ref == format('refs/{0}/{1}', matrix.source, matrix.version))
77+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event.client_payload.ref == format('refs/{0}/{1}', matrix.source, matrix.version)
7878
uses: actions/setup-node@v3
7979
with:
8080
node-version: "20"
8181

82-
- name: 🏗 Install mermaid-cli
83-
if: matrix.mermaid_fix == 'true' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event.client_payload.ref == format('refs/{0}/{1}', matrix.source, matrix.version))
82+
- name: 🏗 Prepare stuff for mermaid
83+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event.client_payload.ref == format('refs/{0}/{1}', matrix.source, matrix.version)
8484
run: |
85+
npx puppeteer browsers install chrome-headless-shell
86+
echo '{"args": ["--no-sandbox"]}' > puppeteer-config.json
87+
cat puppeteer-config.json
88+
8589
npm install @mermaid-js/mermaid-cli
8690
8791
- name: ⬇ Checkout OctoPrint
@@ -107,7 +111,7 @@ jobs:
107111
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event.client_payload.ref == format('refs/{0}/{1}', matrix.source, matrix.version)
108112
run: |
109113
cd ${{ github.workspace }}/docs.octoprint.org/util/versionselector
110-
python versionselector.py ${{ github.workspace }}/OctoPrint/docs/ ${{ matrix.version }} ${{ env.OCTOPRINT_VERSION }} ${{ github.workspace }}/versions.json -D mermaid_cmd=${{ github.workspace }}/node_modules/.bin/mmdc -D mermaid_output_format=svg -D mermaid_version=
114+
python versionselector.py ${{ github.workspace }}/OctoPrint/docs/ ${{ matrix.version }} ${{ env.OCTOPRINT_VERSION }} ${{ github.workspace }}/versions.json -D mermaid_cmd=${{ github.workspace }}/node_modules/.bin/mmdc -D mermaid_params="-p${{ github.workspace }}/puppeteer-config.json" -D mermaid_output_format=svg -D mermaid_version=
111115
echo ".rst-content object[type^='image/']{width: 100%;}" >> ${{ github.workspace }}/OctoPrint/docs/_build/html/${{ matrix.version }}/_static/theme_overrides.css
112116
113117
#- name: 🔎 Run link check

0 commit comments

Comments
 (0)