-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathbuild.sh
55 lines (38 loc) · 1.43 KB
/
build.sh
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
#! /bin/bash
## Usage: bash build.sh ../htdocs
## git pull
git reset --hard HEAD && git pull
DEST=${1:-_site}
echo Destination is = $DEST
#setup dest
#jekyll dependencies
bundle install
#build jekyll site
bundle exec jekyll build -q
#install gitbook itself
npm -g install gitbook-cli
# build gitbooks: rtbiz/core/dev
gitbook install rtbiz/core/dev && gitbook build rtbiz/core/dev _site/rtbiz/core/dev
# build gitbooks: rtbiz/core/user
gitbook install rtbiz/core/user && gitbook build rtbiz/core/user _site/rtbiz/core/user
# build gitbooks: rtbiz/helpdesk/admin
gitbook install rtbiz/helpdesk/admin && gitbook build rtbiz/helpdesk/admin _site/rtbiz/helpdesk/admin
# build gitbooks: rtbiz/helpdesk/staff
gitbook install rtbiz/helpdesk/staff && gitbook build rtbiz/helpdesk/staff _site/rtbiz/helpdesk/staff
# build gitbooks: rtmedia
gitbook install rtmedia && gitbook build rtmedia _site/rtmedia
# rsync
rsync -avz _site/ $DEST
#deploy
# install-packages:
# apt-get install sshpass rsync #needed by cdn77
#deploy docs to cdn
# rsync -avz --progress --rsh="sshpass -p $SSHPASS ssh -l $SSHUSER -o StrictHostKeyChecking=no" _site/* $SSHUSER@$SSHHOST:/www/
#purge cdn
# 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