diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index bbf6090..16a93fd 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -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"