diff --git a/lib/git.js b/lib/git.js index 25f69d4a7..c67d577f7 100644 --- a/lib/git.js +++ b/lib/git.js @@ -136,11 +136,7 @@ function deploy(action) { finally { // Cleans up temporary files/folders and restores the git state. core_1.info('Running post deployment cleanup jobs… 🗑️'); - if (!action.singleCommit) { - core_1.info(`Resetting branch and removing artifacts…`); - yield execute_1.execute(`git checkout -B ${temporaryDeploymentBranch}`, `${action.workspace}/${temporaryDeploymentDirectory}`, action.silent); - yield execute_1.execute(`git branch -D ${action.branch} --force`, action.workspace, action.silent); - } + yield execute_1.execute(`git checkout -B ${temporaryDeploymentBranch}`, `${action.workspace}/${temporaryDeploymentDirectory}`, action.silent); yield execute_1.execute(`git worktree remove ${temporaryDeploymentDirectory} --force`, action.workspace, action.silent); yield io_1.rmRF(temporaryDeploymentDirectory); }