-
Notifications
You must be signed in to change notification settings - Fork 0
/
.woodpecker.yml
65 lines (61 loc) · 1.47 KB
/
.woodpecker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
steps:
- name: Build Site (main)
image: hugomods/hugo:exts-0.139.2
commands:
- git submodule update --init --recursive
- hugo
when:
branch: main
event: [ push, manual ]
- name: Deploy to VPS (main)
image: appleboy/drone-scp
settings:
host:
from_secret: ssh_host
target: /var/www/blog
source: public/*
username:
from_secret: ssh_username
key:
from_secret: ssh_key
port:
from_secret: ssh_port
when:
branch: main
event: [ push, manual ]
- name: Build Site (staging)
image: hugomods/hugo:exts-0.139.2
commands:
- git submodule update --init --recursive
- hugo
when:
branch: staging
event: [ push, manual ]
- name: Deploy to VPS (staging)
image: appleboy/drone-scp
settings:
host:
from_secret: ssh_host
target: /var/www/staging
source: public/*
username:
from_secret: ssh_username
key:
from_secret: ssh_key
port:
from_secret: ssh_port
when:
branch: staging
event: [ push, manual ]
- name: Send TG Notification
image: appleboy/drone-telegram
settings:
token:
from_secret: tg_token
to:
from_secret: tg_id
format: markdown
message: "{{#success build.status}}✅ Build for `{{repo.name}}` was *successful*!{{else}}❌ Build for `{{repo.name}}` has *FAILED*!{{/success}} \n🌐 [Output]({{build.link}})\n📝 Commit: {{ commit.message }}"
when:
status: [ success, failure ]
event: [ push, manual ]