mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Additional Changes
This commit is contained in:
parent
beb7701f57
commit
beddbf76e3
@ -43,8 +43,7 @@ exports.action = {
|
|||||||
? core_1.getInput('GIT_CONFIG_EMAIL')
|
? core_1.getInput('GIT_CONFIG_EMAIL')
|
||||||
: pusher && pusher.email
|
: pusher && pusher.email
|
||||||
? pusher.email
|
? pusher.email
|
||||||
: `${process.env.GITHUB_ACTOR ||
|
: `${process.env.GITHUB_ACTOR || 'github-pages-deploy-action'}@users.noreply.github.com`,
|
||||||
'github-pages-deploy-action'}@users.noreply.github.com`,
|
|
||||||
gitHubToken: core_1.getInput('GITHUB_TOKEN'),
|
gitHubToken: core_1.getInput('GITHUB_TOKEN'),
|
||||||
name: !util_1.isNullOrUndefined(core_1.getInput('GIT_CONFIG_NAME'))
|
name: !util_1.isNullOrUndefined(core_1.getInput('GIT_CONFIG_NAME'))
|
||||||
? core_1.getInput('GIT_CONFIG_NAME')
|
? core_1.getInput('GIT_CONFIG_NAME')
|
||||||
|
@ -151,6 +151,7 @@ function deploy(action) {
|
|||||||
// Cleans up temporary files/folders and restores the git state.
|
// Cleans up temporary files/folders and restores the git state.
|
||||||
core_1.info('Running post deployment cleanup jobs… 🗑️');
|
core_1.info('Running post deployment cleanup jobs… 🗑️');
|
||||||
yield execute_1.execute(`git worktree remove ${temporaryDeploymentDirectory} --force`, action.workspace);
|
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);
|
yield io_1.rmRF(temporaryDeploymentDirectory);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -15,8 +15,7 @@ exports.generateTokenType = (action) => action.ssh
|
|||||||
/* Generates a the repository path used to make the commits. */
|
/* Generates a the repository path used to make the commits. */
|
||||||
exports.generateRepositoryPath = (action) => action.ssh
|
exports.generateRepositoryPath = (action) => action.ssh
|
||||||
? `git@github.com:${action.repositoryName}`
|
? `git@github.com:${action.repositoryName}`
|
||||||
: `https://${action.accessToken ||
|
: `https://${action.accessToken || `x-access-token:${action.gitHubToken}`}@github.com/${action.repositoryName}.git`;
|
||||||
`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. */
|
/* Checks for the required tokens and formatting. Throws an error if any case is matched. */
|
||||||
exports.hasRequiredParameters = (action) => {
|
exports.hasRequiredParameters = (action) => {
|
||||||
if ((exports.isNullOrUndefined(action.accessToken) &&
|
if ((exports.isNullOrUndefined(action.accessToken) &&
|
||||||
|
Loading…
Reference in New Issue
Block a user