@@ -22,21 +22,19 @@ jobs:
2222 node-version : [24.x]
2323
2424 steps :
25- - name : Check out the en branch
26- uses : actions/checkout@v4
27- with :
28- ref : en
29- token : ${{ secrets.GITHUB_TOKEN }}
30- fetch-depth : 0
31-
3225 - name : Check out scripts from main branch
3326 uses : actions/checkout@v4
3427 with :
3528 ref : main
3629 sparse-checkout : |
3730 .github/scripts
38- sparse-checkout-cone-mode : false
39- path : .main-scripts
31+ token : ${{ secrets.GITHUB_TOKEN }}
32+
33+ - name : Check out api schemas from en branch
34+ uses : actions/checkout@v4
35+ with :
36+ ref : en
37+ path : openapi
4038 token : ${{ secrets.GITHUB_TOKEN }}
4139
4240 - name : Set up Node.js
@@ -45,21 +43,18 @@ 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
59546055 env :
6156 REPO : self
6257 BRANCH : en-api-docs
63- FOLDER : .
58+ FOLDER : openapi
6459 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6560 MESSAGE : " Add SDK code samples to OpenAPI files"
0 commit comments