diff --git a/lib/constants.js b/lib/constants.js index ae0313df..9b5b12f7 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -43,7 +43,8 @@ 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..9d6b0caf 100644 --- a/lib/git.js +++ b/lib/git.js @@ -142,6 +142,7 @@ function deploy(action) { core_1.info('Cleared git history… 🚿'); } yield execute_1.execute(`git checkout --progress --force ${action.defaultBranch}`, action.workspace); + yield execute_1.execute(`git branch -D ${temporaryDeploymentBranch}`, action.workspace); return constants_1.Status.SUCCESS; } catch (error) { diff --git a/lib/util.js b/lib/util.js index 2b378944..fcf0b761 100644 --- a/lib/util.js +++ b/lib/util.js @@ -15,7 +15,8 @@ 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) &&