添加部署教程

This commit is contained in:
York 2025-02-20 13:07:15 +08:00
parent 0f79bd4f44
commit 7420c524ac

View File

@ -1,4 +1,4 @@
# 牛子小助手 (GoodDick Assistant)
# 牛子小助手 (DickHelper)
[![React](https://img.shields.io/badge/React-19.0.0-blue.svg)](https://reactjs.org/)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.7.2-blue.svg)](https://www.typescriptlang.org/)
@ -39,7 +39,7 @@ If you want to run this project locally, follow these steps:
```bash
# 克隆项目 | Clone the repository
git clone https://github.com/yourusername/GoodDick.git
git clone https://github.com/zzzdajb/DickHelper.git
# 进入项目目录 | Enter the project directory
cd GoodDick
@ -51,6 +51,50 @@ npm install
npm run dev
```
## 云端部署 | Cloud Deployment
本项目是纯前端应用,可以轻松部署到各种静态网站托管平台。以下是两个推荐的免费托管方案:
This is a frontend-only application that can be easily deployed to various static site hosting platforms. Here are two recommended free hosting solutions:
### Cloudflare Pages
1. 在 GitHub 上创建仓库并推送代码
Create a repository on GitHub and push your code
2. 登录 [Cloudflare Pages](https://pages.cloudflare.com)
Login to Cloudflare Pages
3. 点击 "Create a project" 并选择你的 GitHub 仓库
Click "Create a project" and select your GitHub repository
4. 配置构建设置 | Configure build settings:
- Build command: `npm run build`
- Build output directory: `dist`
- Framework preset: `Vite`
5. 点击 "Save and Deploy"
Click "Save and Deploy"
### Vercel
1. 在 GitHub 上创建仓库并推送代码
Create a repository on GitHub and push your code
2. 登录 [Vercel](https://vercel.com)
Login to Vercel
3. 点击 "New Project" 并导入你的 GitHub 仓库
Click "New Project" and import your GitHub repository
4. 保持默认配置即可Vercel 会自动检测 Vite 项目
Keep the default configuration, Vercel will automatically detect Vite project
5. 点击 "Deploy"
Click "Deploy"
部署完成后这两个平台都会提供一个可访问的URL。你可以选择使用自己的域名。
After deployment, both platforms will provide an accessible URL. You can choose to use your own domain name.
## 技术栈 | Tech Stack
- React 19.0.0