feat: added deploy using gitlab ci

Signed-off-by: Louis Vallat <contact@louis-vallat.fr>
This commit is contained in:
Louis Vallat 2024-04-13 15:04:19 +02:00
parent ad3fef2902
commit 7a3c6df9ee
Signed by: louis
SSH Key Fingerprint: SHA256:0iPwDU/PZtEy/K13Oar4TzmcunmI9H5U9IsOR3jyT/Q

17
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,17 @@
image: ghcr.io/getzola/zola:v0.18.0
stages:
- deploy
deploy:
stage: deploy
before_script:
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
script:
- zola build
- rsync -e "ssh -o StrictHostKeyChecking=no -p $SSH_PORT" -rvz ./public/ $SSH_DESTINATION:/var/www/blog.louis-vallat.fr/ --delete
only:
- master