stages: - build - deploy variables: NAME: "yova" EMAIL: "tech@freedomhost.de" GIT_SUBMODULE_STRATEGY: recursive HUGO_DOMAIN: wntr.org HUGO_BASEURL: https://$HUGO_DOMAIN/ build: image: xdevbase/hugo-builder stage: build only: - main script: - hugo artifacts: paths: - public/ deploy: image: alpine stage: deploy environment: name: development url: $HUGO_BASEURL only: - main before_script: - apk add --no-cache rsync openssh - mkdir -p ~/.ssh - echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config script: - cd public - rsync -rz -e 'ssh -p 1006' . gh0st@135.125.132.92:/var/www/$HUGO_DOMAIN