-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
40 lines (25 loc) · 755 Bytes
/
deploy.sh
File metadata and controls
40 lines (25 loc) · 755 Bytes
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
33
34
35
36
37
38
39
40
#!/usr/bin/env sh
# 确保脚本抛出遇到的错误
set -e
rm -rf vuepress
# 生成静态文件
npm run docs:build
gulp doc
cp -r ./screenshot ./vuepress/api/
npm run build
cp ./dist/clchart.js ./samples/clchart.js
cp ./dist/clchart.js.map ./samples/clchart.js.map
cp -r ./samples ./vuepress
# 进入生成的文件夹
cd ./vuepress
# 如果是发布到自定义域名
# echo 'www.example.com' > CNAME
git init
git add -A
git commit -m 'deploy'
# 如果发布到 https://<USERNAME>.github.io
# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master
# 如果发布到 https://seerline.github.io/clchart
git push -f git@github.com:seerline/clchart.git master:gh-pages
cd -
rm -rf ./samples/clchart.js ./samples/clchart.js.map