mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 08:49:51 +02:00
refactor: perform shallow clone during deploy (#5748)
Co-authored-by: slorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
02858ba79f
commit
6763496dc1
1 changed files with 3 additions and 1 deletions
|
@ -167,7 +167,9 @@ Try using DEPLOYMENT_BRANCH=main or DEPLOYMENT_BRANCH=master`);
|
|||
const toPath = await fs.mkdtemp(
|
||||
path.join(os.tmpdir(), `${projectName}-${deploymentBranch}`),
|
||||
);
|
||||
if (shellExecLog(`git clone ${remoteBranch} ${toPath}`).code !== 0) {
|
||||
if (
|
||||
shellExecLog(`git clone --depth 1 ${remoteBranch} ${toPath}`).code !== 0
|
||||
) {
|
||||
throw new Error(`Running "git clone" command in "${toPath}" failed.`);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue