From 7bc3d4ddfd0853b37816de90a16865d6967f4bf0 Mon Sep 17 00:00:00 2001 From: qiukai Date: Tue, 5 May 2026 03:23:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=20deploy.sh=20?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 deploy.sh diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..65e3d15 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# Ailab 部署脚本 — 将主题文件上传到 WordPress 服务器 +set -e + +SERVER="personal" +REMOTE_THEME_DIR="/opt/wordpress/wp-content/themes/twentysixteen" +REMOTE_MU_DIR="/opt/wordpress/wp-content/mu-plugins" +CONTAINER="wordpress" + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" + +echo "=== 上传 twentysixteen 主题 ===" +rsync -avz --delete \ + --exclude='screenshot.png' \ + --exclude='.git' \ + "$SCRIPT_DIR/twentysixteen/" "$SERVER:$REMOTE_THEME_DIR/" + +echo "=== 上传 mu-plugins ===" +rsync -avz "$SCRIPT_DIR/mu-plugins/" "$SERVER:$REMOTE_MU_DIR/" + +echo "" +echo "=== 部署完成 ===" +echo "已同步到: https://qiukai.me"