Skip to content

Commit af3ecbe

Browse files
committed
fix: push schemas from openapi directory
1 parent 87f4bd9 commit af3ecbe

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

.github/workflows/en-api-docs.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,24 @@ jobs:
2222
node-version: [24.x]
2323

2424
steps:
25-
- name: Check out the en branch
25+
- name: Check out the main branch
2626
uses: actions/checkout@v4
2727
with:
28-
ref: en
28+
ref: main
2929
token: ${{ secrets.GITHUB_TOKEN }}
3030
fetch-depth: 0
3131

32-
- name: Check out scripts from main branch
32+
- name: Remove current openapi directory
33+
run: rm -rf openapi
34+
35+
- name: Check out api schemas from en branch
3336
uses: actions/checkout@v4
3437
with:
35-
ref: main
38+
ref: en
3639
sparse-checkout: |
37-
.github/scripts
40+
openapi
3841
sparse-checkout-cone-mode: false
39-
path: .main-scripts
42+
path: openapi
4043
token: ${{ secrets.GITHUB_TOKEN }}
4144

4245
- name: Set up Node.js
@@ -45,21 +48,18 @@ jobs:
4548
node-version: ${{ matrix.node-version }}
4649

4750
- name: Install script dependencies
48-
working-directory: .main-scripts/.github/scripts
51+
working-directory: .github/scripts
4952
run: npm install
5053

5154
- name: Run add-code-samples script
52-
working-directory: .main-scripts/.github/scripts
53-
run: npm run add-code-samples -- "../../.." "openapi.*\\.json"
54-
55-
- name: Cleanup working directory
56-
run: rm -rf .main-scripts
55+
working-directory: .github/scripts
56+
run: npm run add-code-samples -- "../../openapi/openapi" "openapi.*\\.json"
5757

58-
- name: Push processed files to en-api-docs branch
58+
- name: Push openapi directory to en-api-docs branch
5959
6060
env:
6161
REPO: self
6262
BRANCH: en-api-docs
63-
FOLDER: .
63+
FOLDER: openapi/openapi
6464
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6565
MESSAGE: "Add SDK code samples to OpenAPI files"

0 commit comments

Comments
 (0)