feat: enhance Gitea theme with cyber glassmorphism template, custom home hero and 3D banner logo
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env bash
|
||||
# deploy.sh - Deploy Gitea Custom Cyber Theme & 3D Banner Logo
|
||||
# Domain: gitea.free-warez.win
|
||||
# Target Host: free-warez.win -> /opt/containers/gitea/gitea/gitea
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
TARGET_HOST="free-warez.win"
|
||||
TARGET_DIR="/opt/containers/gitea/gitea/gitea"
|
||||
LOCAL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
echo "🚀 Deploying Gitea Cyber Theme & 3D Banner"
|
||||
echo " Target: $TARGET_HOST:$TARGET_DIR"
|
||||
echo "==============================================="
|
||||
|
||||
# 1. Check SSH connection
|
||||
echo "📡 Checking SSH connection to $TARGET_HOST..."
|
||||
if ! ssh -q -o BatchMode=yes -o ConnectTimeout=5 "$TARGET_HOST" exit; then
|
||||
echo "❌ Cannot connect to $TARGET_HOST via SSH."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 2. Sync Assets (CSS & Images)
|
||||
echo "🔄 Syncing custom assets (CSS & 3D Banner)..."
|
||||
rsync -avz "$LOCAL_DIR/assets/" "$TARGET_HOST:$TARGET_DIR/public/assets/"
|
||||
|
||||
# 3. Sync Templates (Custom header & Home page)
|
||||
if [ -d "$LOCAL_DIR/templates" ]; then
|
||||
echo "🔄 Syncing custom templates..."
|
||||
rsync -avz "$LOCAL_DIR/templates/" "$TARGET_HOST:$TARGET_DIR/templates/"
|
||||
fi
|
||||
|
||||
# 4. Fix permissions
|
||||
echo "🔒 Ensuring correct permissions for git user (1000:1000)..."
|
||||
ssh "$TARGET_HOST" "chown -R 1000:1000 $TARGET_DIR/public $TARGET_DIR/templates"
|
||||
|
||||
# 5. Restart Gitea container
|
||||
echo "🔄 Restarting Gitea container..."
|
||||
ssh "$TARGET_HOST" "docker restart gitea"
|
||||
|
||||
echo "✅ Gitea theme & 3D banner updated!"
|
||||
echo "✨ Deployment complete!"
|
||||
Reference in New Issue
Block a user