diff --git a/deploy-and-train.sh b/deploy-and-train.sh index 69e14b7..d9bb4e5 100755 --- a/deploy-and-train.sh +++ b/deploy-and-train.sh @@ -21,15 +21,11 @@ DEPLOY_USER="${LORA_DEPLOY_USER:-}" DEPLOY_TOKEN="${LORA_DEPLOY_TOKEN:-}" # Build the repo URL; embed user:token for HTTPS auth when provided. -# Use local Gitea if available, otherwise fall back to remote -if ping -c 1 -W 1 192.168.50.232 &>/dev/null; then - REPO_URL="${LORA_DEPLOY_REPO_URL:-http://192.168.50.232:8091/cmedina/agenx-lora-training.git}" +# Use remote Gitea (local Gitea instances may not be accessible) +if [ -n "${DEPLOY_USER}" ] && [ -n "${DEPLOY_TOKEN}" ]; then + REPO_URL="${LORA_DEPLOY_REPO_URL:-https://${DEPLOY_USER}:${DEPLOY_TOKEN}@gitea.cyaren.com/cmedina/agenx-lora-training.git}" else - if [ -n "${DEPLOY_USER}" ] && [ -n "${DEPLOY_TOKEN}" ]; then - REPO_URL="${LORA_DEPLOY_REPO_URL:-https://${DEPLOY_USER}:${DEPLOY_TOKEN}@gitea.cyaren.com/cmedina/agenx-lora-training.git}" - else - REPO_URL="${LORA_DEPLOY_REPO_URL:-https://gitea.cyaren.com/cmedina/agenx-lora-training.git}" - fi + REPO_URL="${LORA_DEPLOY_REPO_URL:-https://gitea.cyaren.com/cmedina/agenx-lora-training.git}" fi REPO_DIR="${LORA_DEPLOY_REPO_DIR:-/opt/loras/agenx-lora-training}" BRANCH="${LORA_DEPLOY_BRANCH:-main}"