samsapti.dev/.drone.yml
Sam A. 8c15e6abb9
All checks were successful
continuous-integration/drone/push Build is passing
Fix .drone.yml
2023-03-14 19:15:56 +01:00

34 lines
857 B
YAML

kind: pipeline
type: docker
name: Build and Deploy
steps:
- name: build
image: klakegg/hugo:ext-alpine-ci
environment:
HUGO_SECURITY_HTTP_URLS: none
commands:
- apk add --no-cache git py3-pygments
- git submodule update --init --single-branch --depth=1
- hugo
- name: deploy
image: alpine/git:latest
environment:
SSH_KEY:
from_secret: ssh_key
commands:
- mkdir ~/.ssh
- echo "$${SSH_KEY}" > ~/.ssh/id_ed25519
- chmod 600 ~/.ssh/id_ed25519
- ssh -o "StrictHostKeyChecking no"
cicd@cpx.servers.sapti.me "rm -rf /opt/docker/nginx/website/public/*"
- scp -o "StrictHostKeyChecking no" -r
./public cicd@cpx.servers.sapti.me:/opt/docker/nginx/website
when:
branch:
- main
event:
exclude:
- pull_request