From 1a29bc11e10507f9d0136d79711146237f425172 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Sko=C5=99epa?= <jakub@skorepa.info>
Date: Sat, 16 Apr 2016 20:50:31 +0200
Subject: [PATCH] Change upload to user sshfs

---
 .gitlab-ci.yml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b9f09630..62beb492 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,7 +8,11 @@ all:
     - if [ -d static    ] ; then cd static;    git pull; cd ..; else git clone https://git.ok1kvk.cz/ok1kvk.cz/static.git;    fi
     - cd generator/; npm install; cd ..
     - node generator/index.js --contentdir . --staticdir static --themedir generator/theme --builddir build --noserver
-    - generator/upload
+    - mkdir -p upload
+    - echo $LFTP_PASSWORD | sshfs -o password_stdin -p 2121 ok1kvk.cz-www-nove@krios.blueboard.cz:/ upload
+    - /usr/bin/time -f "Upload took %e" -- node generator/sftp-sync.js --sourcedir build --server localdirectory --targetdir upload --port 2121
+    - fusermount -u upload
+    - rm -rf upload
 
 cache:
   paths:
-- 
GitLab