-
-
Notifications
You must be signed in to change notification settings - Fork 63
/
deploy.sh
39 lines (25 loc) · 862 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
#!/usr/bin/env sh
# 确保脚本抛出遇到的错误
set -e
# 生成静态文件
vuepress build docs
# 进入生成的文件夹
cd docs/.vuepress/dist
# 如果是发布到自定义域名
# echo 'www.example.com' > CNAME
git init
git add -A
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]:yszhao91/cga.js.git master:gh-pages
rm -rf *
cd -
git checkout master
# git config --global http.proxy socks5://127.0.0.1:5006
# git config --global https.proxy socks5://127.0.0.1:5006
# git config --global https.proxy http://127.0.0.1:5006
# git config --global https.proxy https://127.0.0.1:5006
# git config --global --unset http.proxy
# git config --global --unset https.proxy