-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeploy-all.bat
50 lines (44 loc) · 1.52 KB
/
deploy-all.bat
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
@echo off
echo building...
call build.bat
echo building-complete.
cd docs/.vuepress/dist
git init
git config user.name maonianyou
git config user.email [email protected]
git add -A
git commit -m "%date% %time% auto-deploy"
REM 静默推送的话可在地址里填入username和password,如
REM git remote add origin https://username:[email protected]/username/repo.git
git remote add origin https://gitee.com/coder-monkey/v-blog.git
git pull
git push --force origin HEAD:v-blog-pages
echo "/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_"
echo "/_/_ Gitee Pages Deploy Complete! /_/_"
echo "/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_"
REM 部署完上面的 Gitee Pages
REM 需要删除 .git 文件夹
REM 以备部署 GitHub Pages 再次初始化时用
rmdir /s /q "%cd%/.git"
git init
git config user.name maonianyou
git config user.email [email protected]
git add -A
git commit -m "%date% %time% auto-deploy"
REM 静默推送的话可在地址里填入username和password,如
REM git remote add origin https://username:[email protected]/username/repo.git
git remote add origin https://github.com/CoderMonkie/v-blog.git
git pull
git push --force origin HEAD:gh-pages
echo "/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_"
echo "/_/_ GitHub Pages Deploy Complete!/_/_"
echo "/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_"
REM To delete the dist folder
cd ..
echo delete-directory: "%cd%/dist"
:: rmdir /s /q "%cd%/dist"
cd..
cd..
echo "/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_"
echo "/_/_/_/_ Auto-Deploy-Complete!/_/_/_/_"
echo "/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_"