Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: 加入deploy:win #727

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@
# 确保脚本抛出遇到的错误
set -e

# 判断是否传入参数
if [ "$1" = "win" ]; then
build_cmd="build:win"
else
build_cmd="build"
fi

push_addr=`git remote get-url --push origin` # git提交地址,也可以手动设置,比如:[email protected]:xugaoyi/vuepress-theme-vdoing.git
commit_info=`git describe --all --always --long`
dist_path=docs/.vuepress/dist # 打包生成的文件夹路径
push_branch=gh-pages # 推送的分支

# 生成静态文件
npm run build
npm run $build_cmd

# 进入生成的文件夹
cd $dist_path
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"predev": "node utils/check.js dev && vdoing",
"prebuild": "node utils/check.js build && vdoing",
"deploy": "bash deploy.sh",
"deploy:win": "bash deploy.sh win",
"editFm": "node utils/editFrontmatter.js",
"baiduPush": "node utils/baiduPush.js https://xugaoyi.com && bash baiduPush.sh",
"publish": "cd ./vdoing && npm publish && cd .. && yarn updateTheme",
Expand Down