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"