From 56dba22d76c8782d8ce3bccb2e4cdffa10c4e4fe Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Wed, 10 Jan 2018 21:15:45 +0800 Subject: + add git push --- Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Dockerfile b/Dockerfile index 985f527..a9d4a49 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,24 @@ WORKDIR /app RUN /bin/bash -c "source /app/.venv/bin/activate && make html" +FROM alpine:latest + +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories + +RUN apk add --update git openssh-client && rm -rf /var/cache/apk/* + +WORKDIR /html + +ENV COMMIT_USER="clarkzjw" +ENV COMMIT_EMAIL="hello@jinwei.me" + +RUN git clone git@github.com:clarkzjw/blog.jinwei.me.git /html && git checkout gh-pages + +COPY --from=builder /app/_build/html /html + +RUN git add -A && git commit -m "`date`" && git push origin gh-pages + + FROM nginx:alpine COPY --from=builder /app/_build/html /usr/share/nginx/html -- cgit v1.2.3