File tree Expand file tree Collapse file tree 3 files changed +47
-0
lines changed
Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+ on :
3+ push :
4+ branches : [master]
5+ pull_request :
6+ branches : [master]
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v2
12+ - uses : actions/setup-node@v2
13+ with :
14+ node-version : ' 10'
15+ - run : npm ci
16+ - run : npm test
17+ - uses : codecov/codecov-action@v2
18+ - run : npm run build
19+ - if : github.ref_name == 'master'
20+ run : |
21+ ./script/gh-release.sh
22+ ./script/gh-deploy.sh
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ echo " Deploy docs to github pages." ;
3+ git checkout --orphan gh-pages;
4+ git reset HEAD -- . ;
5+ npm run docs;
6+ git add -f dist/av* docs demo
7+ git config user.name " leancloud-bot" ;
8+ git config user.email
" [email protected] " ; 9+ git commit -m " Deploy docs and demos to Github Pages [skip ci]" ;
10+ git push -qf origin gh-pages;
11+ echo " done." ;
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ echo " Deploy dist to dist branch." ;
3+ REV=` git rev-parse HEAD` ;
4+ BRANCH=` git rev-parse --abbrev-ref HEAD` ;
5+ DIST_BRANCH=${1:- dist} ;
6+ test " $( git config user.name) " = ' ' && (
7+ git config user.name " leancloud-bot" ;
8+ git config user.email
" [email protected] " ; 9+ )
10+ git add dist -f;
11+ git commit -m " chore(build): build ${REV} [skip ci]" ;
12+ git push -qf origin ${BRANCH} :${DIST_BRANCH} > /dev/null 2>&1 ;
13+ git reset HEAD~1;
14+ echo " done." ;
You can’t perform that action at this time.
0 commit comments