File tree 4 files changed +22
-6
lines changed 4 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ jobs:
13
13
- uses : actions/checkout@v2
14
14
15
15
- name : Set up Docker Build
16
- uses : docker/setup-buildx-action@v1
16
+ uses : docker/setup-buildx-action@v2
17
17
18
18
- name : Login to GitHub Container Registry
19
- uses : docker/login-action@v1
19
+ uses : docker/login-action@v2
20
20
with :
21
21
registry : ghcr.io
22
22
username : ${{ github.actor }}
27
27
continue-on-error : true
28
28
29
29
- name : Build Docker image
30
- run : docker-compose build
30
+ uses : docker/build-push-action@v3
31
+ with :
32
+ file : ./docker/Dockerfile
33
+ platforms : linux/amd64
34
+ push : true
35
+ tags : ghcr.io/rust-lang-ja/book-ja-pdf:latest
31
36
32
37
- name : PDF build
33
38
run : docker-compose up --abort-on-container-exit
Original file line number Diff line number Diff line change @@ -9,3 +9,4 @@ services:
9
9
- ghcr.io/rust-lang-ja/book-ja-pdf:latest
10
10
volumes :
11
11
- .:/workdir
12
+ tty : true
Original file line number Diff line number Diff line change 1
- FROM pandoc/core:2 .16
1
+ FROM alpine:3 .16
2
2
3
3
LABEL maintainer="YOSHIMRUA Hikaru <yyu [at] mental.poker>"
4
4
@@ -21,6 +21,12 @@ ENV FONT_DEPS \
21
21
22
22
ENV FONT_PATH /usr/share/fonts/
23
23
24
+ ARG TARGETARCH
25
+
26
+ ENV PANDOC_VERSION 2.18
27
+ ENV PANDOC_DOWNLOAD_URL https://github.com/jgm/pandoc/releases/download/$PANDOC_VERSION/pandoc-$PANDOC_VERSION-linux-$TARGETARCH.tar.gz
28
+ ENV PANDOC_ROOT /usr/local/bin/pandoc
29
+
24
30
ENV PERSISTENT_DEPS \
25
31
py-pip \
26
32
rust \
@@ -82,6 +88,11 @@ RUN mkdir -p $FONT_PATH && \
82
88
fc-cache -f -v && \
83
89
apk del .font-deps
84
90
91
+ # Install Pandoc
92
+ RUN wget -qO- "$PANDOC_DOWNLOAD_URL" | tar -xzf - && \
93
+ cp pandoc-$PANDOC_VERSION/bin/pandoc $PANDOC_ROOT && \
94
+ rm -Rf pandoc-$PANDOC_VERSION/
95
+
85
96
# Install Pandocfilter
86
97
COPY requirements.txt ./
87
98
RUN pip install --upgrade pip && \
Original file line number Diff line number Diff line change @@ -43,10 +43,9 @@ if [[ ! -d "./target" ]]; then
43
43
fi
44
44
45
45
# Copy markdown files to the working directory
46
- for f in ./book-ja/docs/markdown /* .md; do
46
+ for f in ./book-ja/src /* .md; do
47
47
cp " $f " target/
48
48
done
49
- cp ./book-ja/src/SUMMARY.md ./target/
50
49
51
50
python3 python/fix_table.py < target/appendix-02-operators.md > target/tmp.md
52
51
mv target/tmp.md target/appendix-02-operators.md
You can’t perform that action at this time.
0 commit comments