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
55on :
@@ -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
63586459 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