forked from videogular/videogular2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
32 lines (23 loc) · 748 Bytes
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Credits of this bash script: https://github.com/steveklabnik/automatically_update_github_pages_with_travis_example
#!/usr/bin/env bash
set -o errexit -o nounset
if [ "$TRAVIS_BRANCH" != "master" ]
then
echo "This commit was made against the $TRAVIS_BRANCH and not the master! No deploy!"
exit 0
fi
rev=$(git rev-parse --short HEAD)
cd docs
mv _book dist/docs
cd dist
git init
git config user.name "Raul Jimenez"
git config user.email "[email protected]"
git remote add upstream "https://[email protected]/videogular/videogular2.git"
git fetch upstream
git reset upstream/gh-pages
# echo "your-custom-domain.com" > CNAME
touch .
git add -A .
git commit -m "ci(GH-Pages): Rebuild pages at ${rev}"
git push -q upstream HEAD:gh-pages