mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
feat: add custom commit message (#1136)
* feat: add custom commit message Addresses: #1135 * Update publish-gh-pages.js * add support to v2 as well * docs: add them * docs
This commit is contained in:
parent
cb1395ee29
commit
c4a9b31984
3 changed files with 16 additions and 3 deletions
|
@ -158,8 +158,10 @@ module.exports = async function deploy(siteDir) {
|
|||
shell.cd(path.join('build', `${projectName}-${deploymentBranch}`));
|
||||
shell.exec('git add --all');
|
||||
|
||||
const commitMessage =
|
||||
process.env.CUSTOM_COMMIT_MESSAGE || 'Deploy website';
|
||||
const commitResults = shell.exec(
|
||||
`git commit -m "Deploy website" -m "Deploy website version based on ${currentCommit}"`,
|
||||
`git commit -m "${commitMessage}" -m "Deploy website version based on ${currentCommit}"`,
|
||||
);
|
||||
if (shell.exec(`git push origin ${deploymentBranch}`).code !== 0) {
|
||||
throw new Error('Error: Git push failed');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue