Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
991a221b20 | |||
3be2bf2e0b | |||
1835fb7b2d |
58
.drone.yml
58
.drone.yml
@ -1,33 +1,35 @@
|
|||||||
---
|
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
|
||||||
name: default
|
name: default
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- master
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Budowanie strony
|
- name: terratest
|
||||||
image: paramah/hugo-deploy
|
image: plugins/docker
|
||||||
commands:
|
settings:
|
||||||
- npm install -D --save autoprefixer
|
username:
|
||||||
- npm install -D --save postcss-cli
|
from_secret: hub_username
|
||||||
- git submodule update --init --recursive
|
password:
|
||||||
- hugo --destination /drone/src/build
|
from_secret: hub_password
|
||||||
- minify -r -o /drone/src/build /drone/src/build
|
repo:
|
||||||
|
from_secret: hub_repo
|
||||||
|
tags: latest
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
|
||||||
- name: Deploy strony
|
- name: notify
|
||||||
image: paramah/hugo-deploy
|
image: appleboy/drone-telegram
|
||||||
commands:
|
settings:
|
||||||
- eval `ssh-agent -s`
|
token:
|
||||||
- echo "$SSH_KEY" | ssh-add -
|
from_secret: telegram_bot_token
|
||||||
- mkdir -p ~/.ssh
|
to:
|
||||||
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
|
from_secret: telegram_group_id
|
||||||
- rsync -rv -e "ssh -p 65522" /drone/src/build/ $SSH_URI:$DEST --checksum
|
message: >
|
||||||
environment:
|
{{#success build.status}}
|
||||||
SSH_KEY:
|
build {{build.link}} triggerd by {{commit.link}} from {{commit.author}} succeeded
|
||||||
from_secret: drone_ssh_key
|
{{else}}
|
||||||
SSH_URI:
|
build {{build.link}} triggerd by {{commit.link}} from {{commit.author}} failed
|
||||||
from_secret: ssh_uri
|
{{/success}}
|
||||||
DEST:
|
when:
|
||||||
from_secret: destination
|
status:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
@ -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=
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user