samsapti.dev/.drone.yml
Sam A. d6039fc59a
All checks were successful
continuous-integration/drone/push Build is passing
Fix .drone.yml
2022-05-24 00:30:44 +02:00

37 lines
791 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: {}