mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Build
This commit is contained in:
parent
0782f2086c
commit
f86ab8fe14
@ -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')
|
||||
|
@ -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) {
|
||||
|
@ -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) &&
|
||||
|
Loading…
Reference in New Issue
Block a user