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"
|
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"
|
||||||
|
|||||||
Reference in New Issue
Block a user