-
Notifications
You must be signed in to change notification settings - Fork 27
/
wercker.yml
110 lines (90 loc) · 3.73 KB
/
wercker.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# our build should run within a Ruby box
# box: wercker/ruby
# docker pull marcellodesales/nodejs-ruby
box: marcellodesales/nodejs-ruby
build:
steps:
# Run a smart version of bundle install
# which improves build execution time of
# future builds
- bundle-install
# A custom script step
# that actually builds the jekyll site
- script:
name: generate site
code: bundle exec jekyll build
# install gitbook itself
- script:
name: install gitbook
code: npm -g install gitbook-cli
# build gitbooks: rtbiz/core/dev
- script:
name: build rtbiz core dev book
code: gitbook install rtbiz/core/dev && gitbook build rtbiz/core/dev _site/rtbiz/core/dev
# build gitbooks: rtbiz/core/user
- script:
name: build rtbiz core user book
code: gitbook install rtbiz/core/user && gitbook build rtbiz/core/user _site/rtbiz/core/user
# build gitbooks: rtbiz/helpdesk/admin
- script:
name: build rtbiz helpdesk admin book
code: gitbook install rtbiz/helpdesk/admin && gitbook build rtbiz/helpdesk/admin _site/rtbiz/helpdesk/admin
# build gitbooks: rtbiz/helpdesk/staff
- script:
name: build rtbiz helpdesk staff book
code: gitbook install rtbiz/helpdesk/staff && gitbook build rtbiz/helpdesk/staff _site/rtbiz/helpdesk/staff
# build gitbooks: rtmedia
- script:
name: build rtmedia book
code: gitbook install rtmedia && gitbook build rtmedia _site/rtmedia
deploy:
steps:
- add-to-known_hosts:
hostname: $SSHHOST
- mktemp:
envvar: PRIVATEKEY_PATH
- create-file:
name: write key
filename: $PRIVATEKEY_PATH
content: $SSH_PRIVATE
overwrite: true
hide-from-log: true
# - script:
# name: deploy jekyll docs and gitbooks to amazon ec2
# code: rsync -avz --progress -e "ssh -i $PRIVATEKEY_PATH" _site/* $SSHUSER@$SSHHOST:$DESTDIR
- sjoerdmulder/[email protected]:
host: $SSHHOST
directory: $DESTDIR
sshkey: $PRIVATEKEY_PATH
user: $SSHUSER
source: _site/
# - install-packages:
# packages: sshpass rsync #needed by cdn77
# - script:
# name: deploy jekyll docs to cdn
# code: rsync -avz --progress --rsh="sshpass -p $SSHPASS ssh -l $SSHUSER -o StrictHostKeyChecking=no" _site/* $SSHUSER@$SSHHOST:/www/
# - script:
# name: deploy rtbiz core dev book
# code: rsync -avz --progress --rsh="sshpass -p $SSHPASS ssh -l $SSHUSER -o StrictHostKeyChecking=no" rtbiz/core/dev/_book/* $SSHUSER@$SSHHOST:/www/rtbiz/core/dev/
#
# - script:
# name: deploy rtbiz core user book
# code: rsync -avz --progress --rsh="sshpass -p $SSHPASS ssh -l $SSHUSER -o StrictHostKeyChecking=no" rtbiz/core/user/_book/* $SSHUSER@$SSHHOST:/www/rtbiz/core/user/
#
# - script:
# name: deploy rtbiz helpdesk admin book
# code: rsync -avz --progress --rsh="sshpass -p $SSHPASS ssh -l $SSHUSER -o StrictHostKeyChecking=no" rtbiz/helpdesk/admin/_book/* $SSHUSER@$SSHHOST:/www/rtbiz/helpdesk/admin/
#
# - script:
# name: deploy rtbiz helpdesk staff book
# code: rsync -avz --progress --rsh="sshpass -p $SSHPASS ssh -l $SSHUSER -o StrictHostKeyChecking=no" rtbiz/helpdesk/staff/_book/* $SSHUSER@$SSHHOST:/www/rtbiz/helpdesk/staff/
# after-steps:
# - script:
# name: purge cdn
# code: curl --data "cdn_id=$CDNID&login=$APIUSER&passwd=$APIPASS" https://client.cdn77.com/api/v2.0/data/purge-all
- sherzberg/slack-notify:
subdomain: rtcamp
token: $SLACKTOKEN
channel: "#docs"
username: wercker
icon_url: https://avatars3.githubusercontent.com/u/1695193?s=140