From b44d7d16448b7f6a2be4f82f4cdc3a45be6306ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20V=C3=ADtek?= <fotomartinkv@gmail.com>
Date: Mon, 15 Jan 2018 21:07:45 +0100
Subject: [PATCH] Fixed linking pictures

---
 .gitlab-ci.yml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2aa00fc7..ccf8ed69 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -24,8 +24,10 @@ preview:
     - node generator/index.js --baseurl /$CI_BUILD_REF_NAME --contentdir . --staticdir fake_static --themedir generator/theme --builddir build --noserver
     - echo "$PREVIEW_SSH_KEY" > sshkey
     - chmod 600 sshkey
-    - rsync -e 'ssh -i sshkey' -rc --delete build/ $SSH_HOST:$HTML_DIR/$CI_BUILD_REF_NAME/
-    - ssh -i sshkey $SSH_HOST ln -fs $HTML_DIR/static/static $HTML_DIR/static/$CI_BUILD_REF_NAME
+    - rsync -e 'ssh -i sshkey' -rc --delete build/ $SSH_HOST:$HTML_DIR/$CI_BUILD_REF_NAME/clanek/
+    - ssh -i sshkey $SSH_HOST git -c $HTML_DIR/static/static/ pull
+    - ssh -i sshkey $SSH_HOST cp -asf $HTML_DIR/static/static/articles/. HTML_DIR/$CI_BUILD_REF_NAME/clanek/
+    - ssh -i sshkey $SSH_HOST cp -sf $HTML_DIR/static/static/images/ HTML_DIR/$CI_BUILD_REF_NAME/
     - rm sshkey
 
 stop_preview:
-- 
GitLab