Compare commits

..

2 Commits

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 35 additions and 37 deletions

View File

@ -1,35 +1,33 @@
---
kind: pipeline kind: pipeline
type: docker
name: default name: default
trigger:
steps:
- name: terratest
image: plugins/docker
settings:
username:
from_secret: hub_username
password:
from_secret: hub_password
repo:
from_secret: hub_repo
tags: latest
when:
branch: branch:
- master - master
- name: notify steps:
image: appleboy/drone-telegram - name: Budowanie strony
settings: image: paramah/hugo-deploy
token: commands:
from_secret: telegram_bot_token - npm install -D --save autoprefixer
to: - npm install -D --save postcss-cli
from_secret: telegram_group_id - git submodule update --init --recursive
message: > - hugo --destination /drone/src/build
{{#success build.status}} - minify -r -o /drone/src/build /drone/src/build
build {{build.link}} triggerd by {{commit.link}} from {{commit.author}} succeeded
{{else}} - name: Deploy strony
build {{build.link}} triggerd by {{commit.link}} from {{commit.author}} failed image: paramah/hugo-deploy
{{/success}} commands:
when: - eval `ssh-agent -s`
status: - echo "$SSH_KEY" | ssh-add -
- success - mkdir -p ~/.ssh
- failure - 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

View File

@ -1,4 +1,4 @@
# Drone docker deploy # Drone hugo
## Użycie ## Użycie
@ -9,11 +9,11 @@ cat ${args[0]} |awk -F\= '{system("drone secret add --repository='${args[1]}' --
Wymagane zmienne: Wymagane zmienne:
``` ```
hub_username= domain=
hub_password= site_path=
hub_repo= ssh_host=
telegram_bot_token= ssh_username=
telegram_group_id= ssh_password=
ssh_port=
``` ```