feat: 添加 deploy.sh 部署脚本
This commit is contained in:
23
deploy.sh
Executable file
23
deploy.sh
Executable 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"
|
||||||
Reference in New Issue
Block a user