Skip to content

Commit 04b1e1c

Browse files
committed
fix: push processed schemas from openapi directory
1 parent 87f4bd9 commit 04b1e1c

File tree

2 files changed

+29
-42
lines changed

2 files changed

+29
-42
lines changed

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

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

2424
steps:
25-
- name: Check out the en branch
25+
- name: Check out scripts from main branch
2626
uses: actions/checkout@v4
2727
with:
28-
ref: en
28+
ref: refs/heads/main
29+
sparse-checkout: |
30+
.github/scripts
2931
token: ${{ secrets.GITHUB_TOKEN }}
30-
fetch-depth: 0
3132

32-
- name: Check out scripts from main branch
33+
- name: Check out api schemas from en branch
3334
uses: actions/checkout@v4
3435
with:
35-
ref: main
36-
sparse-checkout: |
37-
.github/scripts
38-
sparse-checkout-cone-mode: false
39-
path: .main-scripts
36+
ref: refs/heads/en
37+
path: openapi
4038
token: ${{ secrets.GITHUB_TOKEN }}
4139

4240
- name: Set up Node.js
@@ -45,21 +43,17 @@ jobs:
4543
node-version: ${{ matrix.node-version }}
4644

4745
- name: Install script dependencies
48-
working-directory: .main-scripts/.github/scripts
46+
working-directory: .github/scripts
4947
run: npm install
5048

5149
- 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
50+
working-directory: .github/scripts
51+
run: npm run add-code-samples -- "../../openapi" "openapi.*\\.json"
5752

58-
- name: Push processed files to en-api-docs branch
53+
- name: Push openapi directory to en-api-docs branch
5954
6055
env:
6156
REPO: self
62-
BRANCH: en-api-docs
63-
FOLDER: .
57+
BRANCH: refs/heads/en-api-docs
58+
FOLDER: openapi
6459
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65-
MESSAGE: "Add SDK code samples to OpenAPI files"

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

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# The name of this GH action
2-
name: Process JP Branch
2+
name: Process jp Branch
33

44
# Defines when this action should be run
55
on:
@@ -22,21 +22,19 @@ jobs:
2222
node-version: [24.x]
2323

2424
steps:
25-
- name: Check out the jp branch
25+
- name: Check out scripts from main branch
2626
uses: actions/checkout@v4
2727
with:
28-
ref: jp
28+
ref: refs/heads/main
29+
sparse-checkout: |
30+
.github/scripts
2931
token: ${{ secrets.GITHUB_TOKEN }}
30-
fetch-depth: 0
3132

32-
- name: Check out scripts from main branch
33+
- name: Check out api schemas from jp branch
3334
uses: actions/checkout@v4
3435
with:
35-
ref: main
36-
sparse-checkout: |
37-
.github/scripts
38-
sparse-checkout-cone-mode: false
39-
path: .main-scripts
36+
ref: refs/heads/jp
37+
path: openapi
4038
token: ${{ secrets.GITHUB_TOKEN }}
4139

4240
- name: Set up Node.js
@@ -45,26 +43,21 @@ jobs:
4543
node-version: ${{ matrix.node-version }}
4644

4745
- name: Install script dependencies
48-
working-directory: .main-scripts/.github/scripts
46+
working-directory: .github/scripts
4947
run: npm install
5048

5149
- name: Run add-code-samples script
52-
working-directory: .main-scripts/.github/scripts
53-
run: npm run add-code-samples -- "../../.." "openapi.*\\.json"
50+
working-directory: .github/scripts
51+
run: npm run add-code-samples -- "../../openapi" "openapi.*\\.json"
5452

5553
- name: Run link replacement script
56-
working-directory: .main-scripts/.github/scripts
57-
run: npm run replace-links -- "../../.." "openapi.*\\.json" "https://developer.box.com/" "https://developer.box.com/ja/"
54+
working-directory: .github/scripts
55+
run: npm run replace-links -- "../../openapi" "openapi.*\\.json" "https://developer.box.com/" "https://developer.box.com/ja/"
5856

59-
- name: Cleanup working directory
60-
run: rm -rf .main-scripts
61-
62-
- name: Push processed files to jp-api-docs branch
57+
- name: Push openapi directory to jp-api-docs branch
6358
6459
env:
6560
REPO: self
66-
BRANCH: jp-api-docs
67-
FOLDER: .
61+
BRANCH: refs/heads/jp-api-docs
62+
FOLDER: openapi
6863
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69-
MESSAGE: "Add SDK code samples and replace links for Japanese locale"
70-

0 commit comments

Comments
 (0)