Skip to content

Commit 45e54bd

Browse files
feat(scripts): add pushToRepository script (#4114)
Co-authored-by: shortcuts <[email protected]>
1 parent bc84ea9 commit 45e54bd

File tree

11 files changed

+350
-284
lines changed

11 files changed

+350
-284
lines changed

.github/workflows/check.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ jobs:
277277

278278
- name: Generate code snippets
279279
run: yarn cli snippets javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }}
280-
280+
281281
- name: Build the snippets to check validity
282282
run: yarn cli build snippets javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }}
283283

@@ -689,12 +689,7 @@ jobs:
689689
env:
690690
GITHUB_TOKEN: ${{ secrets.ALGOLIA_BOT_TOKEN }}
691691

692-
- name: Push specs and snippets to algolia/doc
693-
run: yarn workspace scripts pushToAlgoliaDoc
694-
env:
695-
GITHUB_TOKEN: ${{ secrets.ALGOLIA_BOT_TOKEN }}
696-
697-
- name: Push guides to algolia/AlgoliaWeb
698-
run: yarn workspace scripts pushToAlgoliaWeb
692+
- name: Push generated files to repositories
693+
run: yarn workspace scripts pushToRepository
699694
env:
700695
GITHUB_TOKEN: ${{ secrets.ALGOLIA_BOT_TOKEN }}

.github/workflows/push-to-algolia-doc.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/push-to-algolia-web.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Push generated files to the given repository
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
name:
7+
description: 'the name of the repository to push files to'
8+
required: true
9+
type: choice
10+
options:
11+
- AlgoliaWeb
12+
- doc
13+
14+
jobs:
15+
push:
16+
name: Push generated files to the given repository
17+
runs-on: ubuntu-22.04
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
ref: main
23+
24+
- name: Setup
25+
id: setup
26+
uses: ./.github/actions/setup
27+
with:
28+
type: minimal
29+
30+
- run: yarn workspace scripts pushToRepository ${{ inputs.name }}
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.ALGOLIA_BOT_TOKEN }}
33+
FORCE: true

scripts/ci/codegen/pushToAlgoliaDoc.ts

Lines changed: 0 additions & 95 deletions
This file was deleted.

scripts/ci/codegen/pushToAlgoliaWeb.ts

Lines changed: 0 additions & 126 deletions
This file was deleted.

0 commit comments

Comments
 (0)