You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
481 B
25 lines
481 B
#!/usr/bin/env sh
|
|
|
|
# 发生错误时终止
|
|
set -e
|
|
|
|
# 构建
|
|
npm run build
|
|
|
|
# 进入构建文件夹
|
|
cd dist
|
|
|
|
# 如果你要部署到自定义域名
|
|
# echo 'www.example.com' > CNAME
|
|
|
|
git init
|
|
git add -A
|
|
git commit -m 'deploy'
|
|
|
|
# 如果你要部署在 https://<USERNAME>.github.io
|
|
# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git main
|
|
|
|
# 如果你要部署在 https://<USERNAME>.github.io/<REPO>
|
|
# git push -f git@github.com:<USERNAME>/<REPO>.git master:gh-pages
|
|
|
|
cd -
|