1
0
mirror of https://github.com/ZSCNetSupportDept/website.git synced 2025-10-29 01:15:04 +08:00
Files
website/docs/devdocs/02-网站/02-开发组网站/03-开发组网站-部署.md
2024-12-29 12:42:28 +08:00

16 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 开发组网站-部署
本篇文章是开发组网站的部署流程备忘录
## 开发部署流程
网站假设在我们的云服务器上服务器会自动从仓库的build分支拉取内容所以网站的开发部署流程是这样的
1. 将website仓库clone到本地/pull拉取最新版本
2. 运行`npm start`在localhost:3000上运行网站的测试版本
3. 确认网站的最新版本没有问题后,运行`npm run docusaurus deploy`npm会自动构建网页文件推送到origin/build分支上(记得配置好你的ssh,联系组长来获取仓库的权限)
4. 服务器获取build分支的最新版本pull到`/var/www/developer`目录下
5. 服务器采用nginx提供对developer.zsxyww.com的访问
## demo
我在cloudflare pages上部署了一个网站的demo,这个网站会自动基于master分支构建而不是获取构建好的build分支可以在上面预览网站的效果觉得没问题了再进行build,网址https://zscdev-demo.pages.dev/
## 服务端
目前网站服务器拉取build构建的方式是通过定时执行5分钟1次一个特定的更新脚本位置在`/opt/developer-build.sh`写在crontab里了