mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2026-05-31 00:12:03 +08:00
Deploy Production Code for Commit fb1eb73a48 🚀
This commit is contained in:
@@ -80,7 +80,7 @@ function generateWorktree(action, worktreedir, branchExists) {
|
||||
catch (error) {
|
||||
(0, core_1.info)('Error encountered while checking out branch. Attempting to continue with a new branch name.');
|
||||
branchName = `temp-${Date.now()}`;
|
||||
checkout = new GitCheckout(branchName, `origin/${action.branch}`);
|
||||
checkout = new GitCheckout(branchName);
|
||||
yield (0, execute_1.execute)(checkout.toString(), `${action.workspace}/${worktreedir}`, action.silent);
|
||||
}
|
||||
if (!branchExists) {
|
||||
@@ -91,6 +91,15 @@ function generateWorktree(action, worktreedir, branchExists) {
|
||||
// New history isn't singleCommit, create empty initial commit
|
||||
yield (0, execute_1.execute)(`git commit --no-verify --allow-empty -m "Initial ${branchName} commit"`, `${action.workspace}/${worktreedir}`, action.silent);
|
||||
}
|
||||
/**
|
||||
* Ensure that the workspace is a safe directory.
|
||||
*/
|
||||
try {
|
||||
yield (0, execute_1.execute)(`git config --global --add safe.directory "${action.workspace}/${worktreedir}"`, action.workspace, action.silent);
|
||||
}
|
||||
catch (_a) {
|
||||
(0, core_1.info)('Unable to set worktree temp directory as a safe directory…');
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user