hadr23/.drone.yml

61 lines
1.6 KiB
YAML
Raw Normal View History

2023-02-05 22:00:01 +01:00
---
kind: pipeline
type: docker
name: default
trigger:
branch:
- master
steps:
- name: Version check
2023-02-05 22:24:30 +01:00
image: klakegg/hugo:ext-alpine-ci
commands:
2023-02-05 22:00:01 +01:00
- echo "Checking Hugo version."
- hugo version
- hugo mod graph
2023-02-08 11:40:24 +01:00
2023-02-05 22:00:01 +01:00
- name: Submodules
2023-02-05 22:24:30 +01:00
image: alpine/git
commands:
2023-02-05 22:00:01 +01:00
- git submodule update --init --recursive
2023-02-08 11:40:24 +01:00
2023-02-05 22:00:01 +01:00
- name: Build
2023-02-05 22:24:30 +01:00
image: klakegg/hugo:ext-alpine-ci
commands:
2023-02-05 22:00:01 +01:00
- hugo --destination /drone/src/build
2023-02-08 11:40:24 +01:00
2023-02-05 22:00:01 +01:00
- name: Upload
2023-02-05 22:24:30 +01:00
image: drillster/drone-rsync
commands:
2023-02-05 22:00:01 +01:00
- eval `ssh-agent -s`
2023-02-05 22:20:00 +01:00
- echo "$SSH_KEY" | ssh-add -
2023-02-05 22:00:01 +01:00
- mkdir -p ~/.ssh
2023-02-05 22:25:29 +01:00
- echo -e "Host *\\n\\tStrictHostKeyChecking no\\n\\n" > ~/.ssh/config
2023-02-06 13:26:14 +01:00
# - 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/
2023-02-08 11:40:24 +01:00
- name: notify
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}}
2023-02-05 22:28:16 +01:00
environment:
SSH_KEY:
2023-02-05 22:28:16 +01:00
from_secret: drone_ssh_key
2023-02-08 11:40:24 +01:00
MATRIX_PASSWD:
from_secred: matrix_password