Skip to content

Commit 1464990

Browse files
committed
Update
1 parent c3229fc commit 1464990

File tree

5 files changed

+1364
-10
lines changed

5 files changed

+1364
-10
lines changed

images/example_workflow.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ jobs:
7070

7171
- name: Puppeteer - Print Web to PDF
7272
run: |
73-
node src/index.js "${{ matrix.book }}"
73+
node /app/src/index.js "${{ matrix.book }}"
7474
env:
7575
CONCURRENCY: 4
7676

7777
- name: Python - Prepare TeX & Planning
7878
run: |
79-
uv run scripts/processor.py "${{ matrix.book }}.json" --plan-only
79+
uv run /app/scripts/processor.py "${{ matrix.book }}.json" --plan-only
8080
8181
- name: LaTeX - Compile Decorations
8282
uses: docker://ghcr.io/rainppr/texlive-full:latest
@@ -85,7 +85,7 @@ jobs:
8585

8686
- name: Python - Final Synthesis & Bookmarks
8787
run: |
88-
uv run scripts/processor.py "${{ matrix.book }}.json" --merge
88+
uv run /app/scripts/processor.py "${{ matrix.book }}.json" --merge
8989
9090
- name: Upload Book Product
9191
uses: actions/upload-artifact@v4

images/exporter-build/Dockerfile

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,35 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
4040
apt-get install -y --no-install-recommends \
4141
python3 python3-pip python3-dev \
4242
bash tini tar zstd unzip git ca-certificates curl wget \
43-
liblmdb0 build-essential libffi-dev ghostscript; \
44-
# Chromium 依赖与中文字体 (整合自 exporter-puppeteer)
45-
apt-get install -y --no-install-recommends \
43+
liblmdb0 build-essential libffi-dev ghostscript \
4644
fonts-noto-cjk fonts-noto-cjk-extra fonts-noto-core fonts-noto-extra \
4745
fonts-liberation fonts-linuxlibertine fonts-noto-color-emoji \
4846
fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf \
4947
libnss3 libxss1 libasound2 libatk-bridge2.0-0 libgtk-3-0 libgbm1 libnspr4 \
50-
libpango-1.0-0 libpangocairo-1.0-0 lsb-release xdg-utils; \
48+
libpango-1.0-0 libpangocairo-1.0-0 lsb-release xdg-utils \
49+
fonts-noto-cjk fonts-noto-cjk-extra fonts-noto-core fonts-noto-extra \
50+
fonts-liberation fonts-linuxlibertine \
51+
fonts-noto-color-emoji \
52+
libnss3 \
53+
fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \
54+
libasound2 \
55+
libatk-bridge2.0-0 \
56+
libgtk-3-0 \
57+
libgbm1 \
58+
zstd gnupg \
59+
tar make bash tini tar zstd git ca-certificates curl wget \
60+
gconf-service libasound2 libatk1.0-0 libc6 libcairo2 \
61+
libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 \
62+
libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 \
63+
libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
64+
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 \
65+
libxss1 libxtst6 ca-certificates fonts-liberation libnss3 lsb-release \
66+
xdg-utils wget \
67+
xvfb gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \
68+
libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \
69+
libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \
70+
libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 \
71+
libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget; \
5172
# 清理
5273
apt-get clean; \
5374
rm -rf /var/lib/apt/lists/*; \
@@ -58,7 +79,7 @@ WORKDIR /app
5879

5980
# 4. 安装 Node 依赖
6081
COPY package.json package-lock.json* .puppeteerrc.* ./
61-
RUN npm ci
82+
RUN npm ci && npx puppeteer browsers install
6283

6384
# 5. 安装 Python 项目依赖
6485
COPY pyproject.toml .python-version ./
@@ -68,7 +89,6 @@ RUN uv sync --locked --no-cache
6889
COPY src/ ./src/
6990
COPY scripts/ ./scripts/
7091
COPY templates/ ./templates/
71-
COPY --chmod=755 bin/ /usr/local/bin/
7292

7393
ENTRYPOINT ["/usr/bin/tini", "--"]
7494
CMD ["npm", "start"]

0 commit comments

Comments
 (0)