-
Notifications
You must be signed in to change notification settings - Fork 44
/
.drone.yml
47 lines (42 loc) · 1.06 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
46
47
kind: pipeline
name: default
type: kubernetes
platform:
os: linux
arch: amd64
clone:
disable: true
steps:
- name: git
pull: if-not-exists
image: plugins/git
settings:
recursive: true
- name: build
pull: if-not-exists
image: python:alpine
commands:
- apk add -U gcc musl-dev
- pip install mkdocs mkdocs-material markdown-include
- mkdocs build
when:
event:
- pull_request
- name: deploy
pull: if-not-exists
image: python:alpine
commands:
- apk add -U openssh git-fast-import gcc musl-dev
- mkdir /root/.ssh && echo -n "$SSH_KEY" > /root/.ssh/id_rsa && chmod 600 /root/.ssh/id_rsa
- touch /root/.ssh/known_hosts && chmod 600 /root/.ssh/known_hosts && ssh-keyscan -H github.com > /etc/ssh/ssh_known_hosts 2> /dev/null
- git remote remove origin && git remote add origin [email protected]:UKHomeOffice/application-container-platform.git
- pip install mkdocs mkdocs-material markdown-include
- mkdocs gh-deploy --force
environment:
SSH_KEY:
from_secret: SSH_KEY
when:
branch:
- master
event:
- push