blog/.drone.yml

52 lines
958 B
YAML
Raw Normal View History

2020-09-02 21:15:49 +00:00
kind: pipeline
name: default
2020-09-03 19:48:21 +00:00
steps:
2020-09-02 21:15:49 +00:00
- name: build
image: silex/emacs:27-alpine
2020-09-02 21:15:49 +00:00
commands:
2020-09-03 19:45:26 +00:00
- apk add hugo git
- git submodule update --init --recursive
2020-09-02 21:15:49 +00:00
- mkdir blog
- emacs --script .export.el
2020-09-02 21:15:49 +00:00
- hugo -d blog
- name: deploy
image: appleboy/drone-scp
settings:
host:
from_secret: ssh_host
target:
from_secret: ssh_target
source: blog/*
strip_components: 1
2020-09-02 21:15:49 +00:00
username:
from_secret: ssh_username
password:
from_secret: ssh_password
port:
from_secret: ssh_port
when:
branch:
- master
event:
exclude:
- pull_request
- name: purge cache
image: jetrails/drone-cloudflare-caching
settings:
api_token:
from_secret: cloudflare_cache_api
zone_identifier:
from_secret: phundrak_com_zone_id
action: purge_files
list:
- https://blog.phundrak.com
when:
branch:
- master
event:
exclude:
- pull_request