Skip to content

Commit 32c0914

Browse files
authored
chore: push processed schemas from openapi directory (#576)
* fix: push processed schemas from openapi directory * chore: remove deployment trigger
1 parent 87f4bd9 commit 32c0914

File tree

3 files changed

+32
-51
lines changed

3 files changed

+32
-51
lines changed

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

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# The name of this GH action
2-
name: Process EN Branch
2+
name: Process en branch
33

44
# Defines when this action should be run
55
on:
@@ -15,28 +15,26 @@ jobs:
1515
process-en-branch:
1616
# We run this on the latest ubuntu
1717
runs-on: ubuntu-latest
18-
timeout-minutes: 15
18+
timeout-minutes: 10
1919

2020
strategy:
2121
matrix:
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: 17 additions & 24 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:
@@ -15,28 +15,26 @@ jobs:
1515
process-jp-branch:
1616
# We run this on the latest ubuntu
1717
runs-on: ubuntu-latest
18-
timeout-minutes: 15
18+
timeout-minutes: 10
1919

2020
strategy:
2121
matrix:
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-

.github/workflows/notify.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ jobs:
2020
node-version: [24.x]
2121

2222
steps:
23-
- name: "Trigger Netlify deployment"
24-
uses: joelwmale/[email protected]
25-
env:
26-
WEBHOOK_URL: ${{ secrets.NETLIFY_BOXDEV_JP_WEBHOOK }}
27-
data: "{}"
28-
2923
- name: Notify other repositories of update
3024
uses: peter-evans/repository-dispatch@v1
3125
with:

0 commit comments

Comments
 (0)