Skip to content

Commit caaee71

Browse files
committed
Let's try auto API
1 parent 03ff8e3 commit caaee71

File tree

3 files changed

+35
-6
lines changed

3 files changed

+35
-6
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ install:
1313

1414
script:
1515
- phpunit --coverage-clover=coverage.clover
16+
- php vendor/bin/sami.php update sami.php
1617

1718
after_script:
1819
- wget https://scrutinizer-ci.com/ocular.phar
1920
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
21+
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && bash bin/deploy.sh
22+
23+
env:
24+
global:
25+
- secure: "L2Fk2prteOc0B0QOs29uw+/8mjf/3x3rVOmh1kQKk/wE3SiUX69shJVnN3fnyFlhSOxgru+qtZoBfwmrJQsFVCEjB0O+m01Mt7wswhpGKzLU6hDUL/Qc6YhV9lTOaKWRFUUg9bPHFcMq8WT0bXxv2bX162ERHG+H1m9WcSDDjBE="

bin/deploy.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
set -o errexit -o nounset
4+
5+
rev=$(git rev-parse --short HEAD)
6+
7+
mkdir _site
8+
cp -R api _site/
9+
cd _site
10+
11+
git init
12+
git config user.name "gossi"
13+
git config user.email "[email protected]"
14+
15+
git remote add upstream "https://$GH_TOKEN@github.com/gossi/php-code-generator.git"
16+
git fetch upstream
17+
git reset upstream/gh-pages
18+
19+
touch .
20+
21+
git add -A .
22+
git commit -m "rebuild pages at ${rev}"
23+
git push -q upstream HEAD:gh-pages

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)