enhance(): Adds the deploy phase
This commit is contained in:
parent
b5d1206135
commit
8156ae17e1
1 changed files with 22 additions and 0 deletions
22
.drone.yml
22
.drone.yml
|
@ -14,3 +14,25 @@ steps:
|
||||||
hugo_version: 0.84.4
|
hugo_version: 0.84.4
|
||||||
validate: true
|
validate: true
|
||||||
pull: always
|
pull: always
|
||||||
|
|
||||||
|
- name: deploy
|
||||||
|
image: alpine
|
||||||
|
volumes:
|
||||||
|
- name: blog-path
|
||||||
|
path: /blog/
|
||||||
|
environment:
|
||||||
|
UID:
|
||||||
|
from_secret: uid
|
||||||
|
GID:
|
||||||
|
from_secret: gid
|
||||||
|
commands:
|
||||||
|
- chown -R "$UID":"$GID" public/*
|
||||||
|
- mv public/ "/blog/${DRONE_COMMIT}"
|
||||||
|
- cd /blog/
|
||||||
|
- rm -f blog.lazkani.io
|
||||||
|
- ln -s "${DRONE_COMMIT}" blog.lazkani.io
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: blog-path
|
||||||
|
host:
|
||||||
|
path: /mnt/blog/
|
||||||
|
|
Loading…
Reference in a new issue