kind: pipeline type: docker name: Build and Deploy steps: - name: Submodules image: alpine/git commands: - git submodule update --init --recursive - name: Build image: xdevbase/hugo-builder:latest commands: - hugo --destination /drone/src/build #- minify -r -o /drone/src/build /drone/src/build - name: Deploy image: xdevbase/hugo-builder:latest commands: - eval `ssh-agent -s` - echo "$SSH_KEY" | ssh-add - - mkdir -p ~/.ssh - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - rsync -rv -e "ssh -p 22" /drone/src/build/ user@guide.thebub.club:/var/www/guide/ --checksum environment: SSH_KEY: from_secret: drone_ssh_key when: event: - push