重构部署流程,统一使用 scripts/devlop.py 进行宝塔服务器部署,简化小程序上传步骤,更新相关文档以反映新流程和依赖项。删除不再使用的脚本和配置文件,提升项目可维护性。
This commit is contained in:
26
.cursorrules
26
.cursorrules
@@ -58,30 +58,18 @@
|
||||
|
||||
2. **部署到小型宝塔服务器**
|
||||
```bash
|
||||
# 压缩项目
|
||||
cd /Users/karuo/Documents/开发/3、自营项目/一场soul的创业实验
|
||||
tar --exclude='node_modules' --exclude='.next' --exclude='.git' -czf /tmp/soul_update.tar.gz .
|
||||
|
||||
# 上传到服务器
|
||||
sshpass -p 'Zhiqun1984' scp /tmp/soul_update.tar.gz root@42.194.232.22:/tmp/
|
||||
|
||||
# SSH部署
|
||||
sshpass -p 'Zhiqun1984' ssh root@42.194.232.22 "
|
||||
cd /www/wwwroot/soul
|
||||
rm -rf app components lib public styles *.json *.js *.ts *.mjs *.md .next
|
||||
tar -xzf /tmp/soul_update.tar.gz
|
||||
rm /tmp/soul_update.tar.gz
|
||||
export PATH=/www/server/nodejs/v22.14.0/bin:\$PATH
|
||||
pnpm install
|
||||
pnpm run build
|
||||
pm2 restart soul
|
||||
"
|
||||
# 在项目根目录执行(本地打包 + SSH 上传 + 宝塔 API 重启)
|
||||
pip install -r requirements-deploy.txt
|
||||
python scripts/devlop.py
|
||||
```
|
||||
- 详见 `DEPLOYMENT.md`、`开发文档/8、部署/当前项目部署到线上.md`
|
||||
|
||||
4. **上传小程序**
|
||||
```bash
|
||||
/Applications/wechatwebdevtools.app/Contents/MacOS/cli upload --project "./miniprogram" -v "版本号" -d "描述"
|
||||
# 项目根目录一键上传(将 miniprogram/ 代码完整上传到微信公众平台)
|
||||
python scripts/autosysc-weixin.py
|
||||
```
|
||||
- 需先在 miniprogram/ 下放置 private.key(公众号后台「开发设置」→ 小程序代码上传密钥)。详见 `开发文档/8、部署/当前项目部署到线上.md`。
|
||||
|
||||
5. **打开微信公众平台**
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user