@@ -0,0 +1,21 @@
#!/bin/bash
# 自动部署脚本
# 每天定时从 Gitea 拉取最新代码并执行构建
# 设置部署目录
DEPLOY_DIR="/root/online-slide"
# 切换到部署目录
cd "$DEPLOY_DIR" || exit 1
# 拉取最新代码(仓库是公开的,无需认证)
git pull origin main
# 安装依赖(如果需要)
npm install
# 执行构建
npm run build
echo "部署完成"
The note is not visible to the blocked user.