Skip to content

Commit 35e96d0

Browse files
authored
feat(scripts): push to docs-new (#4850)
1 parent 71ca1bc commit 35e96d0

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

scripts/ci/codegen/pushToRepository.ts

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ import { commitStartRelease } from './text.ts';
2424
async function handleSpecFiles(spec: SpecsToPush, tempGitDir: string): Promise<void> {
2525
const output = toAbsolutePath(`${tempGitDir}/${spec.output}`);
2626

27+
if (!(await exists(output))) {
28+
await fsp.mkdir(output, { recursive: true });
29+
}
30+
2731
if (spec.includeSnippets) {
2832
await run(`cp ${toAbsolutePath('docs/bundled/*-snippets.json')} ${output}`);
2933
}

scripts/ci/codegen/types.ts

+28-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ export type RepositoryConfiguration = {
5050
tasks: Array<RepositoryTask>;
5151
};
5252

53-
export const pushToRepositoryConfiguration: { [k in 'AlgoliaWeb' | 'doc' | 'mcp-node']: RepositoryConfiguration } = {
53+
export const pushToRepositoryConfiguration: {
54+
[k in 'AlgoliaWeb' | 'doc' | 'mcp-node' | 'docs-new']: RepositoryConfiguration;
55+
} = {
5456
AlgoliaWeb: {
5557
baseBranch: 'develop',
5658
tasks: [
@@ -103,6 +105,31 @@ export const pushToRepositoryConfiguration: { [k in 'AlgoliaWeb' | 'doc' | 'mcp-
103105
},
104106
],
105107
},
108+
'docs-new': {
109+
baseBranch: 'main',
110+
tasks: [
111+
{
112+
prBranch: 'feat/automated-update-for-specs',
113+
commitMessage: 'feat: update specs and supported versions',
114+
files: {
115+
type: 'specs',
116+
ext: 'yml',
117+
output: 'specs',
118+
includeSnippets: true,
119+
includeSLA: true,
120+
placeholderVariables: { 'openapi: 3.0.2': 'openapi: 3.1.0' },
121+
},
122+
},
123+
{
124+
prBranch: 'feat/automated-update-for-guides',
125+
commitMessage: 'feat: update generated guides',
126+
files: {
127+
type: 'guides',
128+
output: 'specs/guides.json',
129+
},
130+
},
131+
],
132+
},
106133
'mcp-node': {
107134
baseBranch: 'main',
108135
tasks: [

0 commit comments

Comments
 (0)