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 92efb78e2b
🚀
This commit is contained in:
parent
92efb78e2b
commit
b2dd85d2fa
@ -26,7 +26,7 @@ function init(action) {
|
||||
try {
|
||||
(0, core_1.info)(`Deploying using ${action.tokenType}… 🔑`);
|
||||
(0, core_1.info)('Configuring git…');
|
||||
function configureGit(throwOnError) {
|
||||
function configure(throwOnError) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
yield (0, execute_1.execute)(`git config --global --add safe.directory "${action.workspace}"`, action.workspace, action.silent);
|
||||
@ -35,6 +35,7 @@ function init(action) {
|
||||
yield (0, execute_1.execute)(`git config core.ignorecase false`, action.workspace, action.silent);
|
||||
}
|
||||
catch (_a) {
|
||||
(0, core_1.info)('There was a problemissue initilizing git, attempting to resolve …');
|
||||
if (throwOnError) {
|
||||
throw new Error();
|
||||
}
|
||||
@ -42,13 +43,13 @@ function init(action) {
|
||||
});
|
||||
}
|
||||
try {
|
||||
yield configureGit(false);
|
||||
yield configure(false);
|
||||
}
|
||||
catch (_a) {
|
||||
// Attempt to re-run if initial configuration failed using git init.
|
||||
yield (0, execute_1.execute)(`git init`, action.workspace, action.silent);
|
||||
yield (0, execute_1.execute)(`git commit -m "Initial commit" --allow-empty`, action.workspace, action.silent);
|
||||
yield configureGit(true);
|
||||
yield configure(true);
|
||||
}
|
||||
try {
|
||||
if ((process.env.CI && !action.sshKey) || action.isTest) {
|
||||
|
Loading…
Reference in New Issue
Block a user