-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
50 lines (28 loc) · 930 Bytes
/
deploy.sh
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
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env sh
# 确保脚本抛出遇到的错误
set -e
# 生成静态文件
npm run build
# 进入生成的文件夹
cd public
# 如果是发布到自定义域名
# echo 'fuzuxian.fun' > CNAME
git init
git add -A
git config user.name "zuxian"
git config user.email "[email protected]"
git commit -m 'deploy'
# 如果发布到 https://<USERNAME>.github.io
# git push -f [email protected]:<USERNAME>/<USERNAME>.github.io.git master
# 如果发布到 https://<USERNAME>.github.io/<REPO>
# git push -f [email protected]:zuxian/myBlog.git master:gh-pages
git push -f [email protected]:zuxian/fuzuxianBlog.git dist:dist
# https://fuzuxian.fun/zuxian/myBlog/index.html
# https://fuzuxian.fun/zuxian/myBlog/index.html
# http://fuzuxian.fun/fuzuxianBlog/public/index.html
# zuxian.github.io
# http://zuxian.github.io/fuzuxianBlog/
# http://zuxian.github.io/myBlog/
# http://47.103.74.217:80
# http://localhost:8088
cd -