fix: git init in existing empty dir instead of clone
Deploy to Production (witstore.wende.it) / deploy (push) Successful in 8s

This commit is contained in:
2026-06-20 18:39:05 +02:00
parent 94d87eef9e
commit 3d0f800a25
+7 -2
View File
@@ -23,8 +23,13 @@ jobs:
GIT_URL="https://marco:${{ secrets.GIT_TOKEN }}@git.wende.it/marco/WitShop.git" GIT_URL="https://marco:${{ secrets.GIT_TOKEN }}@git.wende.it/marco/WitShop.git"
if [ ! -d "$DEPLOY_PATH/.git" ]; then if [ ! -d "$DEPLOY_PATH/.git" ]; then
echo "==> Erstmalig klonen" echo "==> Git initialisieren"
git clone -b DEV "$GIT_URL" "$DEPLOY_PATH" cd "$DEPLOY_PATH"
git init
git remote add origin "$GIT_URL"
git fetch origin DEV
git reset --hard origin/DEV
git checkout -b DEV || git checkout DEV
else else
echo "==> Code aktualisieren" echo "==> Code aktualisieren"
cd "$DEPLOY_PATH" cd "$DEPLOY_PATH"