-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.drone.yml
42 lines (36 loc) · 1.11 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
clone:
git:
image: plugins/git
recursive: false
pipeline:
pull_build:
image: sots:latest
secrets: [ssh_private_key, ssh_known_hosts, ssh_host]
commands:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- echo "$SSH_HOST" > ~/.ssh/config
- git submodule sync --recursive
- git submodule update --init
- rm -f /base/bpre0.gba
- cp /bpre0.gba ./base/bpre0.gba
- chmod 644 ./base/bpre0.gba
- make -j4 all
build_story:
image: xelatex:latest
commands:
- cd sots-private/story && make
- mv build/story.pdf build/master.pdf
deploy_story:
image: appleboy/drone-scp
host: gitlab.karathan.at
port: 22
strip_components: 3
target: /var/www/sots/story/
source: sots-private/story/build/master.pdf
secrets: [ ssh_password, ssh_username ]