From 7becd0ee0dd54723bbe19a1697b7e5adea821b41 Mon Sep 17 00:00:00 2001 From: gidsi Date: Sun, 11 Nov 2018 16:04:37 +0100 Subject: [PATCH] Add ci --- .circleci/config.yml | 23 +++++++++++++++++++++++ Dockerfile | 6 ++++++ 2 files changed, 29 insertions(+) create mode 100644 .circleci/config.yml create mode 100644 Dockerfile diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..19ef6bd --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,23 @@ +version: 2 +jobs: + build: + docker: + - image: golang:1.6.4 + steps: + - setup_remote_docker + - checkout + - run: + name: Install Docker client + command: | + set -x + VER="17.03.0-ce" + curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz + tar -xz -C /tmp -f /tmp/docker-$VER.tgz + mv /tmp/docker/* /usr/bin + + - run: docker login -u $DOCKER_USER -p $DOCKER_PASS + - run: docker build -t hackimpott/site . + - run: | + docker tag hackimpott/site chaospott/site:$CIRCLE_SHA1 + docker push hackimpott/site:$CIRCLE_SHA1 + docker push hackimpott/site:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c33e5d6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +from jekyll/jekyll as builder +add . /srv/jekyll +run jekyll build --source /srv/jekyll --destination /tmp + +from nginx:alpine +copy --from=builder /tmp /usr/share/nginx/html