-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path.drone.yml
More file actions
69 lines (64 loc) · 1.59 KB
/
Copy path.drone.yml
File metadata and controls
69 lines (64 loc) · 1.59 KB
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
66
67
68
69
---
kind: pipeline
type: docker
name: build-and-deploy
trigger:
branch:
- master
event:
- push
steps:
- name: build
image: ruby:3.3
environment:
CI: "true"
commands:
- bundle install
- make html
- make pdf
- name: deploy
image: alpine:3.23
environment:
SFTP_KEY:
from_secret: sftp_key
SFTP_HOST:
from_secret: sftp_host
SFTP_USER:
from_secret: sftp_user
SFTP_PORT:
from_secret: sftp_port
commands:
- apk add --no-cache lftp openssh-client
- mkdir -p ~/.ssh
- printf '%s\n' "$SFTP_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -p "$SFTP_PORT" "$SFTP_HOST" >> ~/.ssh/known_hosts 2>/dev/null
- >-
LFTP_PASSWORD=dummy lftp --env-password sftp://$SFTP_USER@$SFTP_HOST:$SFTP_PORT -e "
put -O nxsl/ build/nxsl.html -o index.html;
put -O nxsl/ build/nxsl.pdf;
bye"
- name: notify
image: appleboy/drone-telegram
settings:
token:
from_secret: telegram_bot_token
to:
from_secret: telegram_channel_id
format: markdown
disable_web_page_preview: true
message: >
{{#success build.status}}
✅ NXSL Docs [#{{build.number}}]({{build.link}}) succeeded.
{{else}}
❌ NXSL Docs [#{{build.number}}]({{build.link}}) **FAILED**.
`{{commit.message}}` by {{commit.author}}
{{/success}}
when:
status:
- success
- failure
---
kind: signature
hmac: 03851ba76e9854d3f8710fabc5796fd99f6a2d99da14b80fa2974599d2e71ecc
...