diff options
-rw-r--r-- | Dockerfile | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -17,6 +17,24 @@ WORKDIR /app | |||
17 | RUN /bin/bash -c "source /app/.venv/bin/activate && make html" | 17 | RUN /bin/bash -c "source /app/.venv/bin/activate && make html" |
18 | 18 | ||
19 | 19 | ||
20 | FROM alpine:latest | ||
21 | |||
22 | RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories | ||
23 | |||
24 | RUN apk add --update git openssh-client && rm -rf /var/cache/apk/* | ||
25 | |||
26 | WORKDIR /html | ||
27 | |||
28 | ENV COMMIT_USER="clarkzjw" | ||
29 | ENV COMMIT_EMAIL="[email protected]" | ||
30 | |||
31 | RUN git clone [email protected]:clarkzjw/blog.jinwei.me.git /html && git checkout gh-pages | ||
32 | |||
33 | COPY --from=builder /app/_build/html /html | ||
34 | |||
35 | RUN git add -A && git commit -m "`date`" && git push origin gh-pages | ||
36 | |||
37 | |||
20 | FROM nginx:alpine | 38 | FROM nginx:alpine |
21 | 39 | ||
22 | COPY --from=builder /app/_build/html /usr/share/nginx/html | 40 | COPY --from=builder /app/_build/html /usr/share/nginx/html |