Skip to content

Commit

Permalink
feat:Enhance the deploy command to enable the setting of git user.nam…
Browse files Browse the repository at this point in the history
…e and user.email in deployment branch (#9101)
  • Loading branch information
amdshrif committed Jun 25, 2023
1 parent ae2a093 commit eeec615
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/docusaurus/src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,16 @@ You can also set the deploymentBranch property in docusaurus.config.js .`);
}
shellExecLog('git add --all');

const gitUserName = process.env.GIT_USER_NAME;
if (gitUserName) {
shellExecLog(`git config user.name "${gitUserName}"`);
}

const gitUserEmail = process.env.GIT_USER_EMAIL;
if (gitUserEmail) {
shellExecLog(`git config user.email "${gitUserEmail}"`);
}

const commitMessage =
process.env.CUSTOM_COMMIT_MESSAGE ??
`Deploy website - based on ${currentCommit}`;
Expand Down

0 comments on commit eeec615

Please sign in to comment.