From c8c2645c9800b355597df22f2c2b991df0de067c Mon Sep 17 00:00:00 2001 From: Thomas Schwery Date: Thu, 31 Aug 2017 19:34:01 +0200 Subject: [PATCH] Add Gitlab CI to automatically build and deploy the website --- .gitlab-ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..69f0b46 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,26 @@ +image: node:7.9 + +cache: + paths: + - node_modules/ + +node-build: + stage: build + script: + - npm install + - npm run build + artifacts: + expire_in: 1 week + paths: + - build + +metalsmith-deploy: + image: kyleondy/alpine-rsync + stage: deploy + tags: + - pages + only: + - master + script: + - mkdir -p /volumes/output/recettes + - rsync -r build/ /volumes/output/recettes