forked from eduardokum/laravel-boleto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate-api.sh
23 lines (18 loc) · 742 Bytes
/
generate-api.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#Shell script para ser executado pelo travis para subir a documentacao para o github pages
#@ref: https://github.com/ApiGen/ApiGen/wiki/Generate-API-to-Github-pages-via-Travis
#Get ApiGen.phar
wget https://www.apigen.org/apigen.phar
#Generate Api
php apigen.phar generate -s src -d ../gh-pages --title 'Documentação laravel-boletos' --template-theme bootstrap
cd ../gh-pages
#Set identity
git config --global user.email "[email protected]"
git config --global user.name "Travis"
#Add branch
git init
git remote add origin https://${GH_TOKEN}@github.com/eduardokum/laravel-boleto.git > /dev/null
git checkout -B gh-pages
#Push generated files
git add .
git commit -m "Documentacao atualizada"
git push origin gh-pages -fq > /dev/null