@@ -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,23 @@ 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 : mkdir test && echo "README" > test/README.md
56+
57+ - name : Copy openapi directory to test directory
58+ run : cp -r openapi test
5259
53- - name : Push openapi directory to en-api-docs branch
60+ - name : Push test directory to en-api-docs branch
54615562 env :
5663 REPO : self
57- BRANCH : refs/heads/ en-api-docs
58- FOLDER : openapi
64+ BRANCH : en-api-docs
65+ FOLDER : test
5966 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments