samsapti.dev/.drone.yml
Sam A. 613e740ffd
Some checks failed
continuous-integration/drone/push Build is failing
Fix .drone.yml and update README.md
2022-05-24 00:24:50 +02:00

37 lines
793 B
YAML

kind: pipeline
type: docker
name: build-and-deploy
steps:
- name: build
image: klakegg/hugo:latest
volumes:
- name: data
path: /data
commands:
- hugo
- cp -rv public /data
- name: deploy
image: alpine/git:latest
volumes:
- name: data
path: /data
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_ed25519
- scp -o "StrictHostKeyChecking no" -P ${SSH_PORT} -r /data/public ${SSH_USER}@${SSH_HOST}:docker/nginx/website
volumes:
- name: data
temp: {}