-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
32 lines (32 loc) · 1.31 KB
/
.travis.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
sudo: false
dist: trusty
language: ruby
rvm:
- 2.2
branches:
only:
- master
before_install:
- echo -e "machine github.com\n login $CI_USER_TOKEN" >> ~/.netrc
- git submodule add https://github.com/NetAppDocs/jekyll dependencies/jekyll
- rm -rf dependencies/jekyll/.git/
- rm -rf dependencies/jekyll/*.md
- cp -rl dependencies/jekyll/* ./
- rm -rf dependencies
- mv sidebar.yml _data/sidebars/
- sed -i 's/\/jekyll/\/'$REPO_NAME'/g' ./_config.yml
- sed -i 's/`search\.html`/`https\:\/\/docs\.netapp\.com\/us-en\/'$REPO_NAME'\/search\.html`/g' ./webpack/components/Search.js
- ES_INDEX="clouddocs-"$REPO_NAME"-prod"
- SK_INDEXES=$ES_INDEX
- ES_INDEX_URL="https\:\/\/"$ES_AUTH"\@"$ES_API
- SK_ES_URL="https\:\/\/"$ES_API$SK_INDEXES
- sed -i 's/url\:\s*\"localhost\:9200\"/url\:\ \"'$ES_INDEX_URL'\"/g' ./_config.yml
- sed -i 's/index\_name\:\s*.*/index\_name\:\ \"'$ES_INDEX'\"/g' ./_config.yml
- mv search.html ./aws/search.html
- sed -i 's/permalink\:\s*\/search\.html/permalink\:\ aws\/search\.html/g' ./aws/search.html
- sed -i 's/REPO\_URL/'$REPO_NAME'/g' ./webpack/components/Search.js
- sed -i 's/ES\_AUTH/\"'$ES_AUTH'\"/g' ./webpack/components/Search.js
- sed -i 's/SK\_ES\_URL/\"'$SK_ES_URL'\"/g' ./webpack/components/Search.js
- npm install && node_modules/.bin/webpack -p --progress --colors
script:
- bundle exec rake deploy