-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
publish to gh-pages only for master branch
- Loading branch information
1 parent
1819d7c
commit 983fb39
Showing
1 changed file
with
16 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
#!/bin/sh | ||
|
||
rm -rf dist || exit 0; | ||
mkdir dist; | ||
( cd dist | ||
git init | ||
git config user.name "sarbbottam" | ||
git config user.email "sarbbottam@gmail.com" | ||
cp ../example/index.html ./index.html | ||
cp ../example/main.css ./main.css | ||
cp ../example/main.js ./main.js | ||
git add . | ||
git commit -m "initial commit" | ||
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:gh-pages > /dev/null 2>&1 | ||
) | ||
if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then | ||
mkdir dist; | ||
( cd dist | ||
git init | ||
git config user.name "sarbbottam" | ||
git config user.email "sarbbottam@gmail.com" | ||
cp ../example/index.html ./index.html | ||
cp ../example/main.css ./main.css | ||
cp ../example/main.js ./main.js | ||
git add . | ||
git commit -m "initial commit" | ||
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:gh-pages > /dev/null 2>&1 | ||
) | ||
else | ||
echo "not publising to gh-pages" | ||
fi |