Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 25074af

Browse files
committed
[Docs] Update .travis.yml file
1 parent 2487380 commit 25074af

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

.travis.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ branches:
1010
cache:
1111
directories:
1212
- $HOME/.composer/cache
13+
- $HOME/.local
14+
- zf-mkdoc-theme
15+
16+
env:
17+
global:
18+
- SITE_URL: https://zendframework.github.io/zend-eventmanager
19+
- GH_USER_NAME: "Matthew Weier O'Phinney"
20+
- GH_USER_EMAIL: [email protected]
21+
- GH_REF: github.com/zendframework/zend-eventmanager.git
22+
- secure: ""
1323

1424
matrix:
1525
fast_finish: true
@@ -21,6 +31,8 @@ matrix:
2131
- php: 5.6
2232
env:
2333
- EXECUTE_TEST_COVERALLS=true
34+
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
35+
- PATH="$HOME/.local/bin:$PATH"
2436
- php: 7
2537
- php: hhvm
2638
allow_failures:
@@ -33,21 +45,20 @@ notifications:
3345
before_install:
3446
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
3547
- composer self-update
36-
- if [[ $EXECUTE_DOC_CHECK == 'true' ]]; then composer require --dev --no-update phly/bookdown2mkdocs ; fi
3748
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls ; fi
3849

3950
install:
4051
- travis_retry composer install --no-interaction --ignore-platform-reqs --prefer-source
4152
- composer info -i
4253

43-
before_script:
44-
- if [[ $EXECUTE_DOC_CHECK == 'true' ]]; then cp mkdocs.yml mkdocs.yml.orig ; fi
45-
4654
script:
4755
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi
4856
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then ./vendor/bin/phpunit ; fi
4957
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/phpcs ; fi
50-
- if [[ $EXECUTE_DOC_CHECK == 'true' ]]; then make mkdocs ; diff mkdocs.yml mkdocs.yml.orig ; return $? ; fi
58+
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi
59+
60+
after_success:
61+
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi
5162

5263
after_script:
5364
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/coveralls ; fi

0 commit comments

Comments
 (0)