drone/.drone.yml

34 lines
792 B
YAML
Raw Permalink Normal View History

2020-08-31 16:36:53 +00:00
---
2020-08-24 21:07:40 +00:00
kind: pipeline
2020-08-31 16:36:53 +00:00
type: docker
2020-08-24 21:07:40 +00:00
name: default
2020-08-31 16:36:53 +00:00
trigger:
branch:
- master
2020-08-24 21:07:40 +00:00
steps:
2020-08-31 17:12:46 +00:00
- name: Budowanie strony
2020-08-31 16:36:53 +00:00
image: paramah/hugo-deploy
commands:
- npm install -D --save autoprefixer
- npm install -D --save postcss-cli
- git submodule update --init --recursive
- hugo --destination /drone/src/build
- minify -r -o /drone/src/build /drone/src/build
2020-08-31 17:12:46 +00:00
- name: Deploy strony
2020-08-31 16:36:53 +00:00
image: paramah/hugo-deploy
commands:
- eval `ssh-agent -s`
- echo "$SSH_KEY" | ssh-add -
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- rsync -rv -e "ssh -p 65522" /drone/src/build/ $SSH_URI:$DEST --checksum
environment:
SSH_KEY:
from_secret: drone_ssh_key
SSH_URI:
from_secret: ssh_uri
DEST:
from_secret: destination