mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 08:19:07 +02:00
fix(v2): do not force terminate building when running deploy command (#2496)
This commit is contained in:
parent
da7fd1a186
commit
e902a08b52
2 changed files with 3 additions and 2 deletions
|
@ -47,6 +47,7 @@ function compile(config: Configuration[]): Promise<any> {
|
|||
export async function build(
|
||||
siteDir: string,
|
||||
cliOptions: Partial<BuildCLIOptions> = {},
|
||||
forceTerminate: boolean = true,
|
||||
): Promise<string> {
|
||||
process.env.BABEL_ENV = 'production';
|
||||
process.env.NODE_ENV = 'production';
|
||||
|
@ -150,6 +151,6 @@ export async function build(
|
|||
relativeDir,
|
||||
)}.\n`,
|
||||
);
|
||||
!cliOptions.bundleAnalyzer && process.exit(0);
|
||||
forceTerminate && !cliOptions.bundleAnalyzer && process.exit(0);
|
||||
return outDir;
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ export async function deploy(
|
|||
fs.removeSync(tempDir);
|
||||
|
||||
// Build static html files, then push to deploymentBranch branch of specified repo.
|
||||
build(siteDir, cliOptions)
|
||||
build(siteDir, cliOptions, false)
|
||||
.then(outDir => {
|
||||
shell.cd(tempDir);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue