This repository has been archived by the owner on Sep 5, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
auto deploy dist files to gh-pages/dist
- Loading branch information
adon
committed
Jul 16, 2015
1 parent
a76c52b
commit 915b8ac
Showing
3 changed files
with
24 additions
and
0 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 |
---|---|---|
|
@@ -9,3 +9,4 @@ coverage | |
|
||
# build | ||
docs | ||
dist |
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
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
# Assumption: all files are readily built and located at dist/ | ||
|
||
git clone "https://${GH_REF}" -b gh-pages gh-pages | ||
|
||
# copy all files from dist to gh-pages/dist | ||
mkdir gh-pages/dist | ||
cp dist/* gh-pages/dist/ | ||
|
||
# set username as gh-pages-robot | ||
cd gh-pages | ||
git config --local user.name "gh-pages-robot" | ||
git config --local user.email "[email protected]" | ||
|
||
git add dist/. | ||
git commit -m "Deploy latest dist files to gh-pages" | ||
|
||
git push --quiet "https://${GH_TOKEN}@${GH_REF}" > /dev/null 2>&1 |