Skip to content

Commit a62a58a

Browse files
committed
#154 : PHPDocumentor on GH-Pages
1 parent 475d948 commit a62a58a

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.travis_shell_after_success.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
3+
echo "--DEBUG--"
4+
echo "TRAVIS_REPO_SLUG: $TRAVIS_REPO_SLUG"
5+
echo "TRAVIS_PHP_VERSION: $TRAVIS_PHP_VERSION"
6+
echo "TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST"
7+
8+
if [ "$TRAVIS_REPO_SLUG" == "PHPOffice/PHPWord" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_PHP_VERSION" == "5.5" ]; then
9+
10+
echo -e "Publishing PHPDoc...\n"
11+
12+
cp -R build/docs $HOME/docs-latest
13+
14+
cd $HOME
15+
git config --global user.email "[email protected]"
16+
git config --global user.name "travis-ci"
17+
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/Progi1984/YATSPHP gh-pages > /dev/null
18+
19+
cd gh-pages
20+
echo "--DEBUG : Suppression"
21+
git rm -rf ./docs/$TRAVIS_BRANCH
22+
23+
echo "--DEBUG : Dossier"
24+
mkdir docs
25+
cd docs
26+
mkdir $TRAVIS_BRANCH
27+
28+
echo "--DEBUG : Copie"
29+
cp -Rf $HOME/docs-latest/* ./$TRAVIS_BRANCH/
30+
31+
echo "--DEBUG : Git"
32+
git add -f .
33+
git commit -m "PHPDocumentor (Travis Build : $TRAVIS_BUILD_NUMBER - Branch : $TRAVIS_BRANCH)"
34+
git push -fq origin gh-pages > /dev/null
35+
36+
echo -e "Published PHPDoc to gh-pages.\n"
37+
38+
fi

0 commit comments

Comments
 (0)