-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
43 lines (43 loc) · 1.65 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
33
34
35
36
37
38
39
40
41
42
43
sudo: false
dist: xenial
language: ruby
rvm:
- 2.4.3
jobs:
include:
- stage: deploy
if: branch = main OR repo =~ /-internal/
before_install:
- echo -e "machine github.com\n login $GH_TOKEN" > ~/.netrc && chmod 600 ~/.netrc
- git submodule add https://github.com/NetAppDocs/jekyll dependencies/jekyll
- gem update --system && gem install bundler && gem update bundler
- if [[ -z "$DEPLOY_BRANCH" ]]; then export DEPLOY_BRANCH=gh-pages; fi
- mv dependencies/jekyll/prod-build.sh ./ && ./prod-build.sh
- sudo apt-get -y install graphicsmagick graphicsmagick-libmagick-dev-compat libmagickwand-dev
script:
- if [[ ! -z "$FEATURE_FLAG" ]]; then bundle exec rake buildAll; fi
- mkdir -p /tmp/output && bundle exec jekyll build --trace --destination /tmp/output
- touch /tmp/output/.nojekyll
deploy:
provider: pages
skip_cleanup: true
github_token: $GH_TOKEN
keep_history: false
local_dir: /tmp/output
target_branch: $DEPLOY_BRANCH
verbose: true
on:
all_branches: true
- state: i18n
if: branch = main AND not repo =~ /-internal/
before_install:
- echo -e "machine github.com\n login $GH_TOKEN" >> ~/.netrc && chmod 600 ~/.netrc
- git submodule add https://github.com/NetAppDocs/jekyll-harmony dependencies/jekyll-harmony
- gem update --system && gem install bundler && gem update bundler
install:
- cd dependencies/jekyll-harmony
- bundle install --jobs=3 --retry=3
- bundle exec rake install
- cd -
script:
- if [[ ! -z "$HARMONY_FLAG" ]]; then i18n-translate; fi