This commit is contained in:
JamesIves 2020-04-09 11:05:35 -04:00
parent ce9af1d28d
commit 0f7ac9d558

View File

@ -74,9 +74,9 @@ function deploy(action) {
core_1.info('Starting to commit changes…'); core_1.info('Starting to commit changes…');
try { try {
util_1.hasRequiredParameters(action); util_1.hasRequiredParameters(action);
const commitMessage = `${!util_1.isNullOrUndefined(action.commitMessage) const commitMessage = !util_1.isNullOrUndefined(action.commitMessage)
? action.commitMessage ? action.commitMessage
: `Deploying to ${action.branch} from ${action.baseBranch}`} ${process.env.GITHUB_SHA ? `@ ${process.env.GITHUB_SHA}` : ''} 🚀`; : `Deploying to ${action.branch} from ${action.baseBranch} ${process.env.GITHUB_SHA ? `@ ${process.env.GITHUB_SHA}` : ''} 🚀`;
/* /*
Checks to see if the remote exists prior to deploying. Checks to see if the remote exists prior to deploying.
If the branch doesn't exist it gets created here as an orphan. If the branch doesn't exist it gets created here as an orphan.
@ -144,6 +144,7 @@ function deploy(action) {
} }
finally { finally {
// Ensures the deployment directory is safely removed. // Ensures the deployment directory is safely removed.
yield execute_1.execute(`chmod u+w -R ${temporaryDeploymentDirectory}`, action.workspace);
yield execute_1.execute(`rm -rf ${temporaryDeploymentDirectory}`, action.workspace); yield execute_1.execute(`rm -rf ${temporaryDeploymentDirectory}`, action.workspace);
} }
}); });