blog.lazkani.io/.drone.yml

39 lines
654 B
YAML
Raw Normal View History

2021-07-04 06:22:25 +00:00
---
kind: pipeline
name: default
steps:
2021-07-04 06:55:35 +00:00
- name: submodules
2021-07-04 06:35:32 +00:00
image: alpine/git
commands:
- git submodule update --init --recursive
2021-07-04 06:22:25 +00:00
- name: build
image: plugins/hugo
settings:
hugo_version: 0.84.4
validate: true
pull: always
2021-07-04 06:59:25 +00:00
- 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/