Skip to content

Commit 4085a31

Browse files
committed
使用自定义gitbook镜像
1 parent 0dce2c3 commit 4085a31

File tree

2 files changed

+5
-29
lines changed

2 files changed

+5
-29
lines changed

.github/workflows/pages.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,7 @@ jobs:
5151
run: rm -rf output
5252
- name: Build
5353
run: npm run docs:build
54-
# - name: Deploy
55-
# uses: peaceiris/actions-gh-pages@v3
56-
# with:
57-
# github_token: ${{ secrets.GITHUB_TOKEN }}
58-
# publish_dir: ./output
54+
5955
- name: Setup Pages
6056
uses: actions/configure-pages@v4
6157
- name: Upload artifact

Dockerfile

+4-24
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,8 @@
1-
FROM lscr.io/linuxserver/calibre:latest AS build-stage
2-
ENV NODE_VERSION=10.24.1
3-
ENV DEBIAN_FRONTEND noninteractive
4-
RUN ebook-convert --version
5-
RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list \
6-
&& sed -i 's/security.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list \
7-
&& apt-get update \
8-
&& apt-get install --force-yes --no-install-recommends wget fonts-wqy-microhei \
9-
libgl1-mesa-glx libegl1 libxkbcommon0 libopengl0 -y \
10-
&& apt-get clean
1+
FROM yunnysunny/gitbook:latest AS build-stage
112

12-
SHELL ["/bin/bash", "-c"]
13-
RUN wget https://mirrors.huaweicloud.com/nodejs/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz
14-
RUN mkdir -p /usr/local/node && tar -zxvf node-v${NODE_VERSION}-linux-x64.tar.gz -C /usr/local/node
15-
ENV PATH="/usr/local/node/node-v${NODE_VERSION}-linux-x64/bin/:${PATH}"
16-
17-
RUN npm config set registry https://mirrors.huaweicloud.com/repository/npm/
18-
RUN npm install gitbook-cli -g
19-
RUN gitbook fetch 3.2.3
20-
21-
RUN useradd -ms /bin/bash gitbook
22-
RUN chown gitbook:gitbook -R /opt
23-
24-
USER gitbook
25-
RUN gitbook current
3+
WORKDIR /opt
4+
COPY . /opt
5+
RUN gitbook pdf .
266
WORKDIR /opt
277
COPY . /opt
288
RUN gitbook pdf .

0 commit comments

Comments
 (0)