angular-cn/aio/deploy-cn.sh

29 lines
422 B
Bash
Raw Normal View History

2018-08-08 11:18:52 +08:00
#!/usr/bin/env bash
set -x
2018-10-25 09:54:55 +08:00
set -e
2018-08-08 11:18:52 +08:00
2018-09-24 10:56:38 +08:00
commitSha=$(git rev-parse --short HEAD)
commitMessage=$(git log --oneline -n 1)
2018-08-08 11:18:52 +08:00
cd `dirname $0`
yarn build
ts-node ./tools/translator/bin/ssr.ts
rm -fr ng-docs.github.io
2018-11-09 08:52:30 +08:00
git clone git@github.com:ng-docs/ng-docs.github.io.git
cp -r dist/* ./ng-docs.github.io/
cd ./ng-docs.github.io
2018-08-08 11:18:52 +08:00
cp index.html 404.html
git add .
2018-09-24 10:56:38 +08:00
git commit --allow-empty -am "${commitMessage}"
2018-08-08 11:18:52 +08:00
2018-09-24 11:01:10 +08:00
git push
2018-08-08 11:18:52 +08:00
cd -