-
Notifications
You must be signed in to change notification settings - Fork 3
/
.drone.yml
45 lines (37 loc) · 1.29 KB
/
.drone.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
kind: pipeline
type: exec
name: deploy
trigger:
branch:
- main
clone:
disable: true
steps:
- name: pull
commands:
- cd /data/commspt-bot-avilla/ && proxychains4 -q git pull origin main
- name: install dependencies
commands:
- docker pull registry1.fw.ac.cn/library/commspt-bot-avilla:latest
- docker run -v /data/commspt-bot-avilla:/app --rm registry1.fw.ac.cn/library/commspt-bot-avilla:latest /opt/pdm/bin/pdm sync --clean --prod
- name: restart
commands:
- docker kill commspt-bot-avilla
- docker start commspt-bot-avilla
- name: send message to telegram via apprise (success)
failure: ignore
commands:
- /root/.local/bin/apprise --title="commspt-bot-avilla DEPLOY" --body="branch main has been deployed successfully." apprise://10.50.0.3:8988/telegram-commspt?tags=all
when:
status:
- success
- name: send message to telegram via apprise (error)
failure: ignore
commands:
- /root/.local/bin/apprise --title="commspt-bot-avilla DEPLOY" --body="error while deploying! please check!" \ apprise://10.50.0.3:8988/telegram-commspt?tags=all
when:
status:
- failure
node:
lxc: "111"
exec: "true"