Add .drone.yml
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Sam A. 2022-05-24 00:21:41 +02:00
parent 0cb92b4c70
commit 18526ffd66

37
.drone.yml Normal file
View file

@ -0,0 +1,37 @@
kind: pipeline
type: docker
name: build-and-deploy
steps:
- name: build
image: klakegg/hugo:latest
volumes:
- name: build
path: /root/build
commands:
- hugo
- cp -rv public /root/build
- name: deploy
image: alpine/git:latest
volumes:
- name: build
path: /root/build
environment:
SSH_USER:
from_secret: ssh_user
SSH_HOST:
from_secret: ssh_host
SSH_PORT:
from_secret: ssh_port
SSH_KEY:
from_secret: ssh_key
commands:
- mkdir $HOME/.ssh
- echo "$SSH_KEY" > $HOME/.ssh/id_ed25519
- chmod 600 $HOME/.ssh/id_25519
- scp -o "StrictHostKeyChecking no" -P ${SSH_PORT} -r /root/build/public ${SSH_USER}@${SSH_HOST}:docker/nginx/website
volumes:
- name: build
temp: {}