File tree Expand file tree Collapse file tree 2 files changed +42
-1
lines changed
Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change @@ -26,4 +26,6 @@ replay_pid*
2626.idea
2727* .iws
2828* .iml
29- * .ipr
29+ * .ipr
30+
31+ /dist /
Original file line number Diff line number Diff line change 1+ @ echo off
2+
3+ :: Ensure script stops on encountering errors
4+ set REPO_URL = git@github.com:xiaoashuo/relaxed-docs.git
5+ set BRANCH_NAME = master
6+ set REMOTE_BRANCH_NAME = gh_pages
7+ :: Generate static files
8+ call yarn docs:build
9+
10+ :: Enter the generated folder
11+ cd docs\.vuepress\dist
12+ :: dir
13+ :: If deploying to a custom domain
14+ :: echo 'www.example.com' > CNAME
15+
16+ :: Initialize a new Git repository
17+ call git init
18+
19+ call git add -A
20+ call git commit -m " deploy"
21+
22+
23+ :: If deploying to https://<USERNAME>.github.io
24+ :: git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master
25+
26+ :: If deploying to https://<USERNAME>.github.io/<REPO>
27+ :: call git push -f git@github.com:xiaoashuo/relaxed-docs.git master:gh_pages
28+ call git push -f %REPO_URL% %BRANCH_NAME% :%REMOTE_BRANCH_NAME%
29+
30+ :: 检查上一个命令的退出代码
31+ if %errorlevel% neq 0 (
32+ echo 错误:推送到GitHub失败。
33+ exit /b %errorlevel%
34+ )
35+ :: Return to the original directory
36+ cd ..
37+ pause()
38+
39+
You can’t perform that action at this time.
0 commit comments