fix: git init in existing empty dir instead of clone
Deploy to Production (witstore.wende.it) / deploy (push) Successful in 8s
Deploy to Production (witstore.wende.it) / deploy (push) Successful in 8s
This commit is contained in:
@@ -23,8 +23,13 @@ jobs:
|
||||
GIT_URL="https://marco:${{ secrets.GIT_TOKEN }}@git.wende.it/marco/WitShop.git"
|
||||
|
||||
if [ ! -d "$DEPLOY_PATH/.git" ]; then
|
||||
echo "==> Erstmalig klonen"
|
||||
git clone -b DEV "$GIT_URL" "$DEPLOY_PATH"
|
||||
echo "==> Git initialisieren"
|
||||
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
|
||||
echo "==> Code aktualisieren"
|
||||
cd "$DEPLOY_PATH"
|
||||
|
||||
Reference in New Issue
Block a user