-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy path.drone.yml
44 lines (42 loc) · 1.36 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
---
pipeline:
install:
image: node:9.9.0
commands:
- npm install npm-login-cmd -g
- npm config set registry https://npm-proxy.fury.io/$${NPM_TOKEN}/humanitec/
- npm config set always-auth
- npx npm-login-cmd
- npm install
secrets: [NPM_USER, NPM_PASS, NPM_EMAIL, NPM_TOKEN]
when:
event: [push, tag]
build-docs:
image: node:9.9.0
commands:
- npx compodoc -p tsconfig.lib.json
when:
event: [push, tag]
status: [success]
deploy-docs:
image: node:9.9.0
commands:
- eval "$(ssh-agent -s)"
- mkdir -p /root/.ssh
- echo "$${SSH_KEY}\n" > /root/.ssh/id_rsa
- echo "$${SSH_PUBLIC_KEY}\n" > /root/.ssh/id_rsa.pub
- ssh-keyscan -t rsa github.com >> /root/.ssh/known_hosts
- chmod 600 /root/.ssh/id_rsa*
- ssh-add -k /root/.ssh/id_rsa
- git config --global user.email "$${NPM_EMAIL}"
- git config --global user.name "$${NPM_USER}"
- git clone [email protected]:Humanitec/docs-site.git
- cd docs-site/hugo/static/marketplace/products-module/products-client/
- cp ../../../../../../documentation/ ./ -r
- git add .
- git commit -m "Updated documentation for products service"
- git push origin master
secrets: [NPM_USER, NPM_EMAIL, SSH_KEY, SSH_PUBLIC_KEY]
when:
event: [push, tag]
status: [success]