diff options
author | clarkzjw <[email protected]> | 2018-01-10 21:15:45 +0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2018-01-10 21:15:45 +0800 |
commit | 56dba22d76c8782d8ce3bccb2e4cdffa10c4e4fe (patch) | |
tree | 11d08506ba6cb26814cd19fbb71252c20ec978fd | |
parent | c008c037facaf632dc9923bb2ecd4c9542c14c9d (diff) | |
download | blog.jinwei.me-56dba22d76c8782d8ce3bccb2e4cdffa10c4e4fe.tar.gz |
+ add git push
-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 |