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