mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Deploy Production Code for Commit 131fed335f
🚀
This commit is contained in:
parent
131fed335f
commit
788c77f122
19
lib/git.js
19
lib/git.js
@ -26,15 +26,12 @@ function init(action) {
|
||||
try {
|
||||
(0, core_1.info)(`Deploying using ${action.tokenType}… 🔑`);
|
||||
(0, core_1.info)('Configuring git…');
|
||||
// try {
|
||||
// await execute(
|
||||
// `git config --global --add safe.directory "${action.workspace}"`,
|
||||
// action.workspace,
|
||||
// action.silent
|
||||
// )
|
||||
// } catch {
|
||||
// info('Unable to set workspace as a safe directory…')
|
||||
// }
|
||||
try {
|
||||
yield (0, execute_1.execute)(`git config --global --add safe.directory "${action.workspace}"`, action.workspace, action.silent);
|
||||
}
|
||||
catch (_a) {
|
||||
(0, core_1.info)('Unable to set workspace as a safe directory…');
|
||||
}
|
||||
yield (0, execute_1.execute)(`git config user.name "${action.name}"`, action.workspace, action.silent);
|
||||
yield (0, execute_1.execute)(`git config user.email "${action.email}"`, action.workspace, action.silent);
|
||||
yield (0, execute_1.execute)(`git config core.ignorecase false`, action.workspace, action.silent);
|
||||
@ -49,7 +46,7 @@ function init(action) {
|
||||
throw new Error();
|
||||
}
|
||||
}
|
||||
catch (_a) {
|
||||
catch (_b) {
|
||||
(0, core_1.info)('Unable to unset previous git config authentication as it may not exist, continuing…');
|
||||
}
|
||||
try {
|
||||
@ -58,7 +55,7 @@ function init(action) {
|
||||
throw new Error();
|
||||
}
|
||||
}
|
||||
catch (_b) {
|
||||
catch (_c) {
|
||||
(0, core_1.info)('Attempted to remove origin but failed, continuing…');
|
||||
}
|
||||
yield (0, execute_1.execute)(`git remote add origin ${action.repositoryPath}`, action.workspace, action.silent);
|
||||
|
Loading…
Reference in New Issue
Block a user