#!/usr/bin/env sh

# 当发生错误时中止脚本
set -e

# 构建
npm run build

# cd 到构建输出的目录下 
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 master

# 部署到 https://<USERNAME>.github.io/<REPO>
# git push -f git@github.com:<USERNAME>/<REPO>.git master:gh-pages

cd -

  

相关文章:

  • 2021-10-23
  • 2021-06-26
  • 2021-07-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-13
猜你喜欢
  • 2021-12-09
  • 2021-11-26
  • 2021-07-11
  • 2022-12-23
  • 2022-12-23
  • 2021-07-13
  • 2021-06-15
相关资源
相似解决方案