From 4b4c5a96af080568825a7f0a60c4283d833543dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Sko=C5=99epa?= <jakub@skorepa.info>
Date: Sun, 29 Jul 2018 16:56:35 +0200
Subject: [PATCH] Fix known_hosts problem

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

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1ddb42a3..7d3be575 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -71,6 +71,8 @@ deploy:
     - 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
+    - mkdir ~/.ssh; chmod 700 ~/.ssh; touch ~/.ssh/known_hosts; chmod 600 ~/.ssh/known_hosts
+    - ssh-keygen -f ~/.ssh/known_hosts -R $SSH_HOST
     - echo "$DEPLOY_SSH_KEY" > sshkey
     - chmod 600 sshkey
     - rsync -e 'ssh -i sshkey' -rc --delete build/ $SSH_HOST:$HTML_DIR/
-- 
GitLab