File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import fsp from 'fs/promises';
3
3
import { resolve } from 'path' ;
4
4
5
5
import {
6
- emptyDirExceptForDotGit ,
7
6
gitCommit ,
8
7
run ,
9
8
toAbsolutePath ,
@@ -44,12 +43,14 @@ async function pushToAlgoliaDoc(): Promise<void> {
44
43
await run ( `git clone --depth 1 ${ githubURL } ${ tempGitDir } ` ) ;
45
44
await run ( `git checkout -B ${ targetBranch } ` , { cwd : tempGitDir } ) ;
46
45
47
- const dest = toAbsolutePath ( `${ tempGitDir } /app_data/api/specs` ) ;
48
- await emptyDirExceptForDotGit ( dest ) ;
49
- await run ( `cp ${ toAbsolutePath ( 'specs/bundled/*.doc.yml' ) } ${ dest } ` ) ;
50
- await run ( `cp ${ toAbsolutePath ( 'config/release.config.json' ) } ${ dest } ` ) ;
51
- await run ( `cp ${ toAbsolutePath ( 'website/src/generated/*.json' ) } ${ dest } ` ) ;
52
- await run ( `cp ${ toAbsolutePath ( 'website/static/img/*-sla.png' ) } ${ dest } ` ) ;
46
+ const pathToSpecs = toAbsolutePath ( `${ tempGitDir } /app_data/api/specs` ) ;
47
+ const pathToImages = toAbsolutePath ( `${ tempGitDir } /assets/images/api` ) ;
48
+ await run ( `cp ${ toAbsolutePath ( 'specs/bundled/*.doc.yml' ) } ${ pathToSpecs } ` ) ;
49
+ await run ( `cp ${ toAbsolutePath ( 'config/release.config.json' ) } ${ pathToSpecs } ` ) ;
50
+ await run ( `cp ${ toAbsolutePath ( 'website/src/generated/*.json' ) } ${ pathToSpecs } ` ) ;
51
+ await run (
52
+ `mkdir -p ${ pathToImages } && cp ${ toAbsolutePath ( 'website/static/img/*-sla.png' ) } ${ pathToImages } ` ,
53
+ ) ;
53
54
54
55
if ( ( await getNbGitDiff ( { head : null , cwd : tempGitDir } ) ) === 0 ) {
55
56
console . log ( `❎ Skipping push docs because there is no change.` ) ;
You can’t perform that action at this time.
0 commit comments