Skip to content

Commit 0257acf

Browse files
committed
fix: guides on ci
1 parent b2b78fb commit 0257acf

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

.github/workflows/check.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,14 @@ jobs:
275275
- name: Run benchmarks
276276
run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --benchmark --no-client --no-requests --no-e2e
277277

278-
- name: Generate code snippets for documentation
278+
- name: Generate code snippets
279279
run: yarn cli snippets javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }}
280280

281+
- name: Generate code guides
282+
run: yarn cli guides javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }}
283+
281284
- name: Zip artifact before storing
282-
run: zip -r -y clients-javascript.zip clients/algoliasearch-client-javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).testsToStore }} ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).snippetsToStore }} -x "**/node_modules**" "**/.yarn/cache/**" "**/.yarn/install-state.gz" "**/build/**" "**/dist/**" "**/.gradle/**" "**/bin/**" "**/.nx/**"
285+
run: zip -r -y clients-javascript.zip clients/algoliasearch-client-javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).testsToStore }} ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).guidesToStore }} -x "**/node_modules**" "**/.yarn/cache/**" "**/.yarn/install-state.gz" "**/build/**" "**/dist/**" "**/.gradle/**" "**/bin/**" "**/.nx/**"
283286

284287
- name: Store javascript clients
285288
uses: actions/upload-artifact@v4
@@ -381,15 +384,21 @@ jobs:
381384
if: ${{ matrix.client.isMainVersion }}
382385
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --benchmark --no-client --no-requests --no-e2e
383386

384-
- name: Generate code snippets for documentation
387+
- name: Generate code snippets
385388
run: yarn cli snippets ${{ matrix.client.language }} ${{ matrix.client.toRun }}
386389

387390
- name: Build the snippets to check validity
388391
run: yarn cli build snippets ${{ matrix.client.language }}
389392

393+
- name: Generate code guides
394+
run: yarn cli guides ${{ matrix.client.language }} ${{ matrix.client.toRun }}
395+
396+
- name: Build the guides to check validity
397+
run: yarn cli build guides ${{ matrix.client.language }}
398+
390399
- name: Zip artifact before storing
391400
if: ${{ matrix.client.isMainVersion }}
392-
run: zip -r -y clients-${{ matrix.client.language }}.zip ${{ matrix.client.path }} ${{ matrix.client.testsToStore }} ${{ matrix.client.snippetsToStore }} -x "**/node_modules**" "**/__pycache__/**" "**/.yarn/cache/**" "**/build/**" "**/.build/**" "**/dist/**" "**/.gradle/**" "**/bin/**" "**/vendor/**" "**/target/**" "**/.dart_tool/**"
401+
run: zip -r -y clients-${{ matrix.client.language }}.zip ${{ matrix.client.path }} ${{ matrix.client.testsToStore }} ${{ matrix.client.guidesToStore }} -x "**/node_modules**" "**/__pycache__/**" "**/.yarn/cache/**" "**/build/**" "**/.build/**" "**/dist/**" "**/.gradle/**" "**/bin/**" "**/vendor/**" "**/target/**" "**/.dart_tool/**"
393402

394403
- name: Store ${{ matrix.client.language }} clients
395404
if: ${{ matrix.client.isMainVersion }}

scripts/ci/githubActions/createMatrix.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ async function createClientMatrix(baseBranch: string): Promise<void> {
9696
return `${testsOutputBase}/client/${clientName}${extension} ${testsOutputBase}/requests/${clientName}${extension} ${testsOutputBase}/e2e/${clientName}${extension} ${testsOutputBase}/benchmark/${clientName}${extension} ${testsRootFolder}/benchmarkResult.json`;
9797
})
9898
.join(' '),
99-
snippetsToStore: `snippets/${language}`,
99+
guidesToStore: `guides/${language} snippets/${language}`,
100100
version,
101101
isMainVersion: true,
102102
};

scripts/ci/githubActions/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export type ClientMatrix = {
4040
*/
4141
testsToStore: string;
4242
/**
43-
* The snippets output path to store in the artifact.
43+
* The guides output path folder to store in the artifact.
4444
*/
45-
snippetsToStore: string;
45+
guidesToStore: string;
4646
/**
4747
* The version of the language to run, used for the setup step.
4848
*/

0 commit comments

Comments
 (0)