blog-static/.drone.yml

38 lines
946 B
YAML
Raw Normal View History

2020-02-11 14:25:44 -08:00
kind: pipeline
type: docker
name: default
2020-02-29 23:04:40 -08:00
volumes:
- name: live-output
temp: {}
2020-02-11 14:25:44 -08:00
steps:
2020-02-29 23:04:40 -08:00
- name: test-compiler
image: archlinux
commands:
- pacman -Sy cmake gcc make llvm bison flex gettext --noconfirm
- cd code/compiler
- ./test.sh
- name: build-live
image: klakegg/hugo:ext-alpine
commands:
2020-02-29 23:04:40 -08:00
- unset HUGO_DESTINATION
- hugo -D --baseUrl "http://danilafe.com:8080" --destination /live-output
volumes:
- name: live-output
path: /live-output
- name: upload-live
image: eeacms/rsync
commands:
2020-02-29 21:52:01 -08:00
- eval `ssh-agent -s`
- echo "$CUSTOM_KEY" | ssh-add -
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
2020-02-29 23:04:40 -08:00
- rsync -rv -e "ssh -p 22" /live-output/ blog-live@danilafe.com:/var/www/blog-live/ --checksum
environment:
CUSTOM_KEY:
from_secret: live_ssh_key
2020-02-29 23:04:40 -08:00
volumes:
- name: live-output
path: /live-output