This is an automated email from the ASF dual-hosted git repository.

critas pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iotdb-docs.git


The following commit(s) were added to refs/heads/main by this push:
     new c86e0326 change deploy to ssh (#963)
c86e0326 is described below

commit c86e03260b992bd0e2443cd30db3624e7c52b7c8
Author: CritasWang <[email protected]>
AuthorDate: Tue Jan 13 09:34:05 2026 +0800

    change deploy to ssh (#963)
---
 .github/workflows/clean-site.yml  | 24 ++++++++++++++++++------
 .github/workflows/site-build.yaml | 14 ++++++++++----
 deploy.cjs                        |  2 +-
 deploy_staging.cjs                |  4 ++--
 4 files changed, 31 insertions(+), 13 deletions(-)

diff --git a/.github/workflows/clean-site.yml b/.github/workflows/clean-site.yml
index cf3b8b4e..61aba607 100644
--- a/.github/workflows/clean-site.yml
+++ b/.github/workflows/clean-site.yml
@@ -28,13 +28,25 @@ jobs:
           echo "❌ Cleanup cancelled:  confirmation not provided"
           exit 1
 
+      - name: Setup SSH
+        env:
+          SSH_KEY: ${{ secrets.IOTDB_WEBSITE_BUILD_SSH }}
+        run: |
+          mkdir -p ~/.ssh
+          echo "$SSH_KEY" > ~/.ssh/id_rsa
+          chmod 600 ~/.ssh/id_rsa
+          ssh-keyscan -H github.com >> ~/.ssh/known_hosts
+
       - name: Checkout iotdb-website repository
-        uses: actions/checkout@v4
-        with:
-          repository: apache/iotdb-website
-          token: ${{ secrets.IOTDB_WEBSITE_BUILD }}
-          fetch-depth: 0
-          ref: ${{ github.event.inputs.target_branch == 'both' && 'asf-site' 
|| github.event.inputs.target_branch }}
+        run: |
+          git clone --bare [email protected]:apache/iotdb-website.git
+          cd iotdb-website.git
+          for branch in asf-site asf-staging; do
+            git branch -r | grep $branch > /dev/null && echo "Branch $branch 
exists"
+          done
+          cd ..
+          git clone [email protected]:apache/iotdb-website.git
+          cd iotdb-website
 
       - name: Configure Git
         run: |
diff --git a/.github/workflows/site-build.yaml 
b/.github/workflows/site-build.yaml
index 688deab6..2a68c963 100644
--- a/.github/workflows/site-build.yaml
+++ b/.github/workflows/site-build.yaml
@@ -40,9 +40,12 @@ jobs:
 
       - name: Deploy staging website
         env:
-          IOTDB_WEBSITE_BUILD: ${{ secrets.IOTDB_WEBSITE_BUILD }}
+          SSH_KEY: ${{ secrets.IOTDB_WEBSITE_BUILD_SSH }}
         run: |
-          git config --global 
url."https://asf-ci-deploy:[email protected]/apache/".insteadOf 
"https://github.com/apache/";
+          mkdir -p ~/.ssh
+          echo "$SSH_KEY" > ~/.ssh/id_rsa
+          chmod 600 ~/.ssh/id_rsa
+          ssh-keyscan -H github.com >> ~/.ssh/known_hosts
           git config --global user.name github-actions
           git config --global user.email 
41898282+github-actions[bot]@users.noreply.github.com
           npm run deploy:staging
@@ -97,9 +100,12 @@ jobs:
 
       - name: Deploy website
         env:
-          IOTDB_WEBSITE_BUILD: ${{ secrets.IOTDB_WEBSITE_BUILD }}
+          SSH_KEY: ${{ secrets.IOTDB_WEBSITE_BUILD_SSH }}
         run: |
-          git config --global 
url."https://asf-ci-deploy:[email protected]/apache/".insteadOf 
"https://github.com/apache/";
+          mkdir -p ~/.ssh
+          echo "$SSH_KEY" > ~/.ssh/id_rsa
+          chmod 600 ~/.ssh/id_rsa
+          ssh-keyscan -H github.com >> ~/.ssh/known_hosts
           git config --global user.name github-actions
           git config --global user.email 
41898282+github-actions[bot]@users.noreply.github.com
           npm run deploy
diff --git a/deploy.cjs b/deploy.cjs
index 44786a25..80ec2a1f 100644
--- a/deploy.cjs
+++ b/deploy.cjs
@@ -22,7 +22,7 @@ ghpages.publish(
   'src/.vuepress/dist',
   {
     branch: 'asf-site',
-    repo: 'https://github.com/apache/iotdb-website.git',
+    repo: '[email protected]:apache/iotdb-website.git',
     message: 'Site checkin for project iotdb-website',
     dotfiles: true,
     history: false,
diff --git a/deploy_staging.cjs b/deploy_staging.cjs
index 15a0a6f5..8551e0bf 100644
--- a/deploy_staging.cjs
+++ b/deploy_staging.cjs
@@ -22,8 +22,8 @@ ghpages.publish(
   'src/.vuepress/dist',
   {
     branch: 'asf-staging',
-    repo: 'https://github.com/apache/iotdb-website.git',
-    message: 'Site checkin for project iotdb-website',
+    repo: '[email protected]:apache/iotdb-website.git',
+    message: 'Site staging checkin for project iotdb-website',
     dotfiles: true,
     history: false,
   },

Reply via email to