Skip to content

Commit ac62c50

Browse files
committed
Script to build gh pages
1 parent a390b38 commit ac62c50

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

ghpages

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
set -e # stop on error
3+
4+
echo bulid client ...
5+
yarn build
6+
echo check out branch gh-pages ...
7+
git checkout -b gh-pages
8+
echo add build folder
9+
git add -f build
10+
echo commit changes
11+
git commit -m "deploy to gh-pages"
12+
echo push to remote gh-pages
13+
git push origin `git subtree split --prefix build`:gh-pages --force
14+
echo checkout branch master
15+
git checkout master
16+
echo delete branch gh-pages
17+
git branch -D gh-pages
18+
echo All done!

0 commit comments

Comments
 (0)