Compare commits

..

3 Commits

Author SHA1 Message Date
991a221b20 TERRATEST 2020-09-27 20:19:24 +02:00
3be2bf2e0b initial commit 2020-08-24 23:28:02 +02:00
1835fb7b2d initial commit 2020-08-24 23:22:32 +02:00
2 changed files with 37 additions and 35 deletions

View File

@ -1,33 +1,35 @@
---
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
steps: - name: notify
- name: Budowanie strony image: appleboy/drone-telegram
image: paramah/hugo-deploy settings:
commands: token:
- npm install -D --save autoprefixer from_secret: telegram_bot_token
- npm install -D --save postcss-cli to:
- git submodule update --init --recursive from_secret: telegram_group_id
- hugo --destination /drone/src/build message: >
- minify -r -o /drone/src/build /drone/src/build {{#success build.status}}
build {{build.link}} triggerd by {{commit.link}} from {{commit.author}} succeeded
- name: Deploy strony {{else}}
image: paramah/hugo-deploy build {{build.link}} triggerd by {{commit.link}} from {{commit.author}} failed
commands: {{/success}}
- eval `ssh-agent -s` when:
- echo "$SSH_KEY" | ssh-add - status:
- mkdir -p ~/.ssh - success
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - failure
- 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 hugo # Drone docker deploy
## Użycie ## Użycie
@ -9,11 +9,11 @@ cat ${args[0]} |awk -F\= '{system("drone secret add --repository='${args[1]}' --
Wymagane zmienne: Wymagane zmienne:
``` ```
domain= hub_username=
site_path= hub_password=
ssh_host= hub_repo=
ssh_username= telegram_bot_token=
ssh_password= telegram_group_id=
ssh_port=
``` ```