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