From 9f9dc04d2121f2543fb36ef3497406b9498c782b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Thu, 6 Dec 2018 16:40:04 +0100
Subject: [PATCH] Add deploy job

---
 .gitlab-ci.yml | 35 ++++++++++++++++++++---------------
 1 file changed, 20 insertions(+), 15 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fff3fba..c157d9f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,27 +1,32 @@
 variables:
   TERM: linux
-  JEKYLL_ENV: production
 
-before_script:
-  - export LC_ALL="C.UTF-8"
-  - export LANG="en_US.UTF-8"
-  - export LANGUAGE="en_US.UTF-8"
-  - export GEM_HOME=$HOME/gems
-  - export PATH=$HOME/gems/bin:$PATH
-  - gem install jekyll
-  - gem install bundler
-  - bundle install
-
-job:
+build:
   stage: build
   tags:
     - jekyll
+  variables:
+    JEKYLL_ENV: production
+  before_script:
+    - export LC_ALL="C.UTF-8"
+    - export LANG="en_US.UTF-8"
+    - export LANGUAGE="en_US.UTF-8"
+    - export GEM_HOME=$HOME/gems
+    - export PATH=$HOME/gems/bin:$PATH
+    - gem install jekyll
+    - gem install bundler
+    - bundle install
   script:
     - bundle exec jekyll build
   artifacts:
     paths:
     - _site
-  only:
-  - master
-
 
+deploy:
+  stage: deploy
+  tags:
+    - secure
+  dependencies:
+    - build
+  script:
+    - scp -r _site/* dynbot@eris.dynare.org:/srv/www.dynare.org/
-- 
GitLab