Fix Odoo 14 Paths and Repo URL

This commit is contained in:
maltayyar2 2026-01-25 16:48:25 +03:00
parent 66d2b8bef5
commit cb47312efc
1 changed files with 33 additions and 17 deletions

View File

@ -1,4 +1,4 @@
name: Hydra Deployment Manager
name: Hydra Deployment Manager (Odoo 14)
on:
push:
@ -129,11 +129,31 @@ jobs:
TARGET_DIR="$TARGET_ROOT/$MODULE"
if [ -d "$TARGET_DIR" ]; then
# Ensure directory exists
if [ ! -d "$TARGET_DIR" ]; then
echo "✨ Creating new module directory: $TARGET_DIR"
mkdir -p "$TARGET_DIR"
fi
cd "$TARGET_DIR"
# Robust Git Initialization
if [ ! -d ".git" ]; then
echo "Initializing new git repo..."
git init
git remote add origin git@github.com:hydracp9/odex25_standard.git
else
# Ensure remote is correct
current_url=$(git remote get-url origin || echo "")
if [ "$current_url" != "git@github.com:hydracp9/odex25_standard.git" ]; then
echo "Updating remote URL..."
git remote set-url origin git@github.com:hydracp9/odex25_standard.git
fi
fi
echo "⬇️ Pulling changes from $BRANCH..."
git fetch origin
git reset --hard origin/$BRANCH
git fetch origin $BRANCH
git reset --hard FETCH_HEAD
if [ "$FORCE_RESTART" == "true" ] || [ "${{ github.event_name }}" == "push" ]; then
echo "🔄 Restarting Service..."
@ -142,7 +162,3 @@ jobs:
fi
echo "✅ Deployment Successful."
else
echo "⚠️ Module directory not found: $TARGET_DIR"
exit 1
fi