Skip to content

Commit 4707967

Browse files
committed
feat: Install mermaid fonts
1 parent d26c406 commit 4707967

File tree

3 files changed

+12
-20
lines changed

3 files changed

+12
-20
lines changed

Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,25 @@ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
66
ENV PUPPETEER_EXECUTABLE_PATH="/usr/bin/chromium"
77

88
# Install Google Chrome Stable and fonts
9-
# Note: this installs the necessary libs to make the browser work with Puppeteer.
9+
# Note: this installs the necessary libs to make the browser work with Puppeteer, and the fonts needed for Mermaid
1010
RUN apt-get update && apt-get install curl gnupg -y \
1111
&& curl --location --silent https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
1212
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
1313
&& apt-get update \
1414
&& apt-get install google-chrome-stable -y --no-install-recommends \
1515
&& apt-get install chromium -y \
16+
&& apt-get install -y \
17+
fonts-noto-cjk fonts-noto-color-emoji \
18+
fonts-terminus fonts-dejavu fonts-freefont-ttf \
19+
fonts-font-awesome fonts-inconsolata \
20+
fonts-linuxlibertine \
21+
&& fc-cache -f \
1622
&& rm -rf /var/lib/apt/lists/*
17-
18-
#ADD install-dependencies.sh install-dependencies.sh
19-
#RUN chmod 755 install-dependencies.sh && /bin/sh install-dependencies.sh
2023

2124
WORKDIR /usr/src/app
2225
COPY . .
2326

27+
# NOTE: We need to install Mermaid globally, as we are not installing the package.json dependencies due to private packages
2428
RUN npm i -g [email protected] @mermaid-js/[email protected]
25-
#RUN npm install
26-
#RUN npx puppeteer browsers install chrome-headless-shell
2729

2830
ENTRYPOINT [ "node", "/usr/src/app/bin/markdown-confluence-sync-action.js"]

dist/index.js

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,13 @@
5656
"test:unit": "jest --config jest.unit.config.js"
5757
},
5858
"license": "Apache-2.0",
59-
"dependencies": {
60-
"@mermaid-js/mermaid-cli": "11.4.0",
61-
"mermaid": "11.5.0",
62-
"@actions/core": "1.11.1",
63-
"yaml": "2.6.1"
64-
},
6559
"devDependencies": {
60+
"@actions/core": "1.11.1",
6661
"@eslint/js": "9.13.0",
6762
"@eslint/json": "0.6.0",
6863
"@eslint/markdown": "6.2.1",
6964
"@github/local-action": "2.2.0",
65+
"@tid-xcut/markdown-confluence-sync": "1.1.0",
7066
"@types/jest": "29.5.14",
7167
"@types/node": "22.9.0",
7268
"@typescript-eslint/eslint-plugin": "8.14.0",
@@ -88,10 +84,8 @@
8884
"lint-staged": "15.2.10",
8985
"replace-in-file": "8.2.0",
9086
"ts-jest": "29.2.5",
91-
"typescript": "5.6.3"
92-
},
93-
"optionalDependencies": {
94-
"@tid-xcut/markdown-confluence-sync": "1.1.0"
87+
"typescript": "5.6.3",
88+
"yaml": "2.6.1"
9589
},
9690
"files": [
9791
"dist",

0 commit comments

Comments
 (0)