From b6971dcb4d9e81690bbe820f727440037f1de859 Mon Sep 17 00:00:00 2001 From: Wonder Date: Wed, 8 Oct 2025 15:20:37 +0800 Subject: [PATCH] =?UTF-8?q?Update:=20=E6=9B=B4=E6=96=B0=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 deploy.sh diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..2f4042b --- /dev/null +++ b/deploy.sh @@ -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 "部署完成"