File tree 2 files changed +24
-1
lines changed
2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -17,4 +17,7 @@ before_script:
17
17
- composer install --no-interaction --prefer-source
18
18
19
19
script :
20
- - phpunit
20
+ - phpunit
21
+
22
+ after_success :
23
+ - if [ $TRAVIS_PHP_VERSION = '5.6' ] && [ $TRAVIS_BRANCH = 'master' ] && [ $TRAVIS_PULL_REQUEST = 'false' ]; then sh generate-api.sh; fi
Original file line number Diff line number Diff line change
1
+ # Get ApiGen.phar
2
+ wget http://www.apigen.org/apigen.phar
3
+
4
+ # Generate Api
5
+ php apigen.phar generate -s src -d ../gh-pages
6
+ cd ../gh-pages
7
+
8
+ # Set identity
9
+ git config --global user.email
" [email protected] "
10
+ git config --global user.name " Travis"
11
+
12
+ # Add branch
13
+ git init
14
+ git remote add origin https://${GH_TOKEN} @github.com/dfridrich/QRPlatba.git > /dev/null
15
+ git checkout -B gh-pages
16
+
17
+ # Push generated files
18
+ git add .
19
+ git commit -m " API updated"
20
+ git push origin gh-pages -fq > /dev/null
You can’t perform that action at this time.
0 commit comments