period3.xyz/.drone.yml

28 lines
626 B
YAML
Raw Normal View History

2022-09-26 20:27:41 +02:00
kind: pipeline
2022-09-26 21:02:49 +02:00
type: docker
2022-09-26 20:27:41 +02:00
name: hello
steps:
2022-09-26 21:46:31 +02:00
- name: deploy
2022-09-26 21:38:22 +02:00
image: ubuntu
2022-09-26 21:46:31 +02:00
environment:
HOST:
from_secret: host
USERNAME:
from_secret: username
SSH_KEY:
from_secret: ssh_key
REPO: https://git.pizzawednesday.club/ktyl/period3.xyz
2022-09-26 20:27:41 +02:00
commands:
2022-09-26 21:46:31 +02:00
- apt-get update -qq > /dev/null
- apt-get install ssh -qq > /dev/null
# a comment hopefully
- which ssh-agent
- eval $(ssh-agent -s)
- echo SSH_KEY > id_rsa
- ssh-add id_rsa
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- ssh USERNAME@HOST "git clone $REPO"