@@ -19,50 +19,48 @@ jobs:
1919 runs-on : ubuntu-latest
2020 steps :
2121 - uses : actions/checkout@v6
22-
22+
2323 - run : git fetch --depth=1
24-
24+
2525 - uses : actions/setup-node@v6
2626 with :
2727 node-version : 22
2828 cache : ' yarn'
29-
29+
3030 - run : yarn install --frozen-lockfile --ignore-engines
31-
31+
3232 - name : Generate API documentation
3333 run : |
3434 yarn generate
3535 yarn doc
36-
37- - name : Setup SSH key for cloud-sdk repo
38- env :
39- SSH_AUTH_SOCK : /tmp/ssh_agent.sock
40- run : |
41- mkdir -p ~/.ssh
42- ssh-keyscan github.com >> ~/.ssh/known_hosts
43- echo "${{ secrets.GH_CLOUD_SDK_WRITE_KEY }}" > ~/.ssh/id_rsa
44- chmod 600 ~/.ssh/id_rsa
45- cat <<EOT >> ~/.ssh/config
46- Host github.com
47- HostName github.com
48- IdentityFile ~/.ssh/id_rsa
49- EOT
50-
36+
37+ - uses : actions/create-github-app-token@v3
38+ id : app-token
39+ with :
40+ app-id : ${{ secrets.SAP_CLOUD_SDK_BOT_CLIENT_ID }}
41+ private-key : ${{ secrets.SAP_CLOUD_SDK_BOT_PRIVATE_KEY }}
42+ owner : SAP
43+ repositories : cloud-sdk
44+ permission-contents : write
45+
5146 - name : Push generated API documentation to cloud-sdk repo
5247 env :
53- USE_SSH : true
48+ GH_TOKEN : ${{ steps.app-token.outputs.token }}
5449 GIT_USER : cloud-sdk-js
50+ BOT_EMAIL : ${{ vars.SAP_CLOUD_SDK_BOT_EMAIL }}
51+ BOT_NAME : ${{ vars.SAP_CLOUD_SDK_BOT_NAME }}
5552 run : |
56- git config --global user.email "[email protected] " 57- git config --global user.name "cloud-sdk-js"
58-
53+ gh auth setup-git
54+ git config user.email "$BOT_EMAIL"
55+ git config user.name "$BOT_NAME"
56+
5957 # Extract major version from input (e.g., v4.5.0 -> v4)
6058 FULL_VERSION="${{ inputs.version }}"
6159 MAJOR_VERSION=$(echo $FULL_VERSION | sed 's/\(v[0-9]*\).*/\1/')
62-
60+
6361 cd ..
64- git clone --depth 1 git@ github.com: SAP/cloud-sdk.git
65-
62+ git clone --depth 1 https:// github.com/ SAP/cloud-sdk.git
63+
6664 # Copy generated docs to versioned folder
6765 rsync -avz --delete cloud-sdk-js/knowledge-base/api-reference/ cloud-sdk/static/api/${MAJOR_VERSION}/
6866
0 commit comments