2024-04-13 15:12:16 +02:00
|
|
|
image: alpine
|
2024-04-13 15:04:19 +02:00
|
|
|
|
2024-04-13 15:14:36 +02:00
|
|
|
variables:
|
|
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
|
|
|
2024-04-13 15:04:19 +02:00
|
|
|
stages:
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
stage: deploy
|
|
|
|
before_script:
|
2024-04-13 15:15:31 +02:00
|
|
|
- apk add openssh zola rsync
|
2024-04-13 15:04:19 +02:00
|
|
|
- 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
|