diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1ddb42a3e8197131ea48b7c9f87e3f3171d62fc6..7d3be575e679aa3c02737a74ffc796009290c8bf 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/