Compare commits

..

2 Commits
master ... hugo

Author SHA1 Message Date
5e86455eb4 clean 2020-08-31 19:12:46 +02:00
2bbdbaece5 new drone integration 2020-08-31 18:36:53 +02:00
2 changed files with 52 additions and 0 deletions

33
.drone.yml Normal file
View File

@ -0,0 +1,33 @@
---
kind: pipeline
type: docker
name: default
trigger:
branch:
- master
steps:
- name: Budowanie strony
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
- name: Deploy strony
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

19
HUGO_DEPLOY.md Normal file
View File

@ -0,0 +1,19 @@
# Drone hugo
## Użycie
```
cat ${args[0]} |awk -F\= '{system("drone secret add --repository='${args[1]}' --name="$1 " --data="$2)}'
```
Wymagane zmienne:
```
domain=
site_path=
ssh_host=
ssh_username=
ssh_password=
ssh_port=
```