Add Vercel deployment support (#9)

This commit is contained in:
AceDataCloud
2024-01-02 00:19:12 +08:00
parent e9e6e3bb4d
commit 19e8edccf9
4 changed files with 31 additions and 0 deletions
+8
View File
@@ -2,4 +2,12 @@
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"
branch="$(git rev-parse --abbrev-ref HEAD)"
if [ "$branch" = "main" ]; then
echo "You can't commit directly to main branch, please checkout a new branch to commit"
exit 1
fi
yarn lint
+4
View File
@@ -28,6 +28,10 @@ AI 问答:
体验网址:[https://hub.zhishuyun.com/](https://hub.zhishuyun.com/),微信或邮箱登录即可立即使用。
## 部署
[![Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/ZhiShuYun/HubFrontend)
## 开发配置
如果您想将源码部署为您自己的系统并进行赚钱,或者基于本系统进行二次开发,可参考下文。
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "add vercel deployment support",
"packageName": "@zhishuyun/hub",
"email": "cqc@cuiqingcai.com",
"dependentChangeType": "patch"
}
+12
View File
@@ -0,0 +1,12 @@
{
"rewrites": [
{
"source": "/api/v1/(.*)",
"destination": "https://https://data.zhishuyun.com/api/v1/$1"
},
{
"source": "/oauth2/v1/(.*)",
"destination": "https://auth.zhishuyun.com/oauth2/v1/$1"
}
]
}