hadr23/.drone.yml

57 lines
1.7 KiB
YAML

---
kind: pipeline
type: docker
name: default
trigger:
branch:
- master
steps:
- name: Version check
image: klakegg/hugo:ext-alpine-ci
commands:
- echo "Checking Hugo version."
- hugo version
- hugo mod graph
- name: Submodules
image: alpine/git
commands:
- git submodule update --init --recursive
- name: Build
image: klakegg/hugo:ext-alpine-ci
commands:
- hugo --destination /drone/src/build
- name: Upload
image: drillster/drone-rsync
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 22222" /drone/src/build/ hadr@server4.unhb.de:/htdocs/ --checksum
- scp -P 22222 -r /drone/src/build/* hadr@server4.un-hack-bar.de:/htdocs/
environment:
SSH_KEY:
from_secret: drone_ssh_key
# Currently not working
#- name: Notify via Matrix
# image: plugins/matrix
# settings:
# homeserver: https://matrix.un-hack-bar.de
# roomid: fUltBPKcpwFMiDQCAL:matrix.un-hack-bar.de
# username: daneelolivaw
# password: $MATRIX_PASSWD
# template: |
# {{#success build.status}}
# {{build.author}} just built `{{repo.name}}:{{build.branch}}` from <${DRONE_COMMIT_LINK}|#{{truncate build.commit 8}}>
# :new: {{build.message}}
# {{else}}
# {{build.author}} just broke the build of `{{repo.name}}:{{build.branch}}` with >${DRONE_COMMIT_LINK}|#{{truncate build.commit 8}}
# :new: :zombie: {{build.message}}
# {{/success}}
# :stopwatch: {{ since build.started }}
# :gear: {{build.link}}
# environment:
# MATRIX_PASSWD:
# from_secred: matrix_password