Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): deploy command should allow customizing git config user.name / user.email in deployment branch (#9101) #9102

Merged
merged 2 commits into from
Jul 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}"`);
}
Comment on lines +218 to +226
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not super fan of having config side-effects like this, and features without documentation


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