diff --git a/lib/constants.js b/lib/constants.js index 9b5b12f7..ae0313df 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -43,8 +43,7 @@ exports.action = { ? core_1.getInput('GIT_CONFIG_EMAIL') : pusher && pusher.email ? pusher.email - : `${process.env.GITHUB_ACTOR || - 'github-pages-deploy-action'}@users.noreply.github.com`, + : `${process.env.GITHUB_ACTOR || 'github-pages-deploy-action'}@users.noreply.github.com`, gitHubToken: core_1.getInput('GITHUB_TOKEN'), name: !util_1.isNullOrUndefined(core_1.getInput('GIT_CONFIG_NAME')) ? core_1.getInput('GIT_CONFIG_NAME') diff --git a/lib/git.js b/lib/git.js index 819b4065..282baa9a 100644 --- a/lib/git.js +++ b/lib/git.js @@ -151,6 +151,7 @@ function deploy(action) { // Cleans up temporary files/folders and restores the git state. core_1.info('Running post deployment cleanup jobs… 🗑️'); yield execute_1.execute(`git worktree remove ${temporaryDeploymentDirectory} --force`, action.workspace); + yield execute_1.execute(`git branch -d ${temporaryDeploymentBranch}`, action.workspace); yield io_1.rmRF(temporaryDeploymentDirectory); } }); diff --git a/lib/util.js b/lib/util.js index fcf0b761..2b378944 100644 --- a/lib/util.js +++ b/lib/util.js @@ -15,8 +15,7 @@ exports.generateTokenType = (action) => action.ssh /* Generates a the repository path used to make the commits. */ exports.generateRepositoryPath = (action) => action.ssh ? `git@github.com:${action.repositoryName}` - : `https://${action.accessToken || - `x-access-token:${action.gitHubToken}`}@github.com/${action.repositoryName}.git`; + : `https://${action.accessToken || `x-access-token:${action.gitHubToken}`}@github.com/${action.repositoryName}.git`; /* Checks for the required tokens and formatting. Throws an error if any case is matched. */ exports.hasRequiredParameters = (action) => { if ((exports.isNullOrUndefined(action.accessToken) &&