diff --git a/scripts/ci/codegen/pushToAlgoliaDoc.ts b/scripts/ci/codegen/pushToAlgoliaDoc.ts index 4c4175bb29..f7d02d7a80 100644 --- a/scripts/ci/codegen/pushToAlgoliaDoc.ts +++ b/scripts/ci/codegen/pushToAlgoliaDoc.ts @@ -44,6 +44,7 @@ async function pushToAlgoliaDoc(): Promise { await run(`git checkout -B ${targetBranch}`, { cwd: tempGitDir }); const pathToSpecs = toAbsolutePath(`${tempGitDir}/app_data/api/specs`); + await run(`rm -rf ${pathToSpecs}/* || true`); await run(`cp ${toAbsolutePath('specs/bundled/*.doc.yml')} ${pathToSpecs}`); await run(`cp ${toAbsolutePath('config/release.config.json')} ${pathToSpecs}`); await run(`cp ${toAbsolutePath('website/src/generated/*.json')} ${pathToSpecs}`);