mirror of
https://github.com/facebook/docusaurus.git
synced 2025-12-29 21:42:50 +00:00
fix(v2): deploy script should force push
This commit is contained in:
parent
fbe2fb879f
commit
aee5834c8a
|
|
@ -164,7 +164,9 @@ module.exports = async function deploy(siteDir) {
|
|||
const commitResults = shell.exec(
|
||||
`git commit -m "${commitMessage}" -m "Deploy website version based on ${currentCommit}"`,
|
||||
);
|
||||
if (shell.exec(`git push origin ${deploymentBranch}`).code !== 0) {
|
||||
if (
|
||||
shell.exec(`git push --force origin ${deploymentBranch}`).code !== 0
|
||||
) {
|
||||
throw new Error('Error: Git push failed');
|
||||
} else if (commitResults.code === 0) {
|
||||
// The commit might return a non-zero value when site is up to date.
|
||||
|
|
|
|||
Loading…
Reference in New Issue