feat: 添加 deploy.sh 部署脚本

This commit is contained in:
Mac
2026-05-05 03:16:34 +08:00
parent 77b3a5dc96
commit f94737f089

23
deploy.sh Executable file
View File

@@ -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"