Skip to content

Commit fe365a4

Browse files
committed
fix: set target branch
1 parent 2c6c824 commit fe365a4

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

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

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

2424
steps:
25-
- name: Check out scripts from main branch
25+
- name: Check out api schemas from en branch
2626
uses: actions/checkout@v4
2727
with:
28-
ref: refs/heads/main
29-
sparse-checkout: |
30-
.github/scripts
28+
ref: refs/heads/en
29+
path: openapi
3130
token: ${{ secrets.GITHUB_TOKEN }}
3231

33-
- name: Check out api schemas from en branch
32+
- name: Check out scripts from main branch
3433
uses: actions/checkout@v4
3534
with:
36-
ref: refs/heads/en
37-
path: openapi
35+
ref: refs/heads/main
36+
path: main
37+
sparse-checkout: |
38+
.github/scripts
3839
token: ${{ secrets.GITHUB_TOKEN }}
3940

4041
- name: Set up Node.js
@@ -43,17 +44,20 @@ jobs:
4344
node-version: ${{ matrix.node-version }}
4445

4546
- name: Install script dependencies
46-
working-directory: .github/scripts
47+
working-directory: main/.github/scripts
4748
run: npm install
4849

4950
- name: Run add-code-samples script
50-
working-directory: .github/scripts
51-
run: npm run add-code-samples -- "../../openapi" "openapi.*\\.json"
51+
working-directory: main/.github/scripts
52+
run: npm run add-code-samples -- "../../../openapi" "openapi.*\\.json"
53+
54+
- name: Run edit
55+
run: rm -f openapi/openapi.json
5256

53-
- name: Push openapi directory to en-api-docs branch
57+
- name: Push test directory to en-api-docs branch
5458
5559
env:
5660
REPO: self
57-
BRANCH: refs/heads/en-api-docs
61+
BRANCH: en-api-docs
5862
FOLDER: openapi
5963
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)