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

davidarthur pushed a commit to branch markdown
in repository https://gitbox.apache.org/repos/asf/kafka-site.git


The following commit(s) were added to refs/heads/markdown by this push:
     new aeffdf125 checkout asf-staging into separate directory
aeffdf125 is described below

commit aeffdf125d68350f4d8fe591e7d28f723d8ddbf7
Author: David Arthur <[email protected]>
AuthorDate: Mon Oct 27 16:51:53 2025 -0500

    checkout asf-staging into separate directory
---
 .github/workflows/build-and-deploy.yml | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/.github/workflows/build-and-deploy.yml 
b/.github/workflows/build-and-deploy.yml
index a5f2da33e..9a59b61a1 100644
--- a/.github/workflows/build-and-deploy.yml
+++ b/.github/workflows/build-and-deploy.yml
@@ -43,35 +43,25 @@ jobs:
     
     - name: Create or checkout asf-staging branch
       run: |
+        # Create scratch space for staging branch
+        mkdir asf-staging
+        cd asf-staging
         # Check if asf-staging branch exists
         if git show-ref --verify --quiet refs/remotes/origin/asf-staging; then
           echo "asf-staging branch exists, checking it out"
           git checkout -B asf-staging origin/asf-staging
         else
-          echo "asf-staging branch doesn't exist, creating it"
-          git checkout --orphan asf-staging
-          git rm -rf .
+          echo "asf-staging branch doesn't exist!"
+          exit 1
         fi
     
     - name: Copy build output to asf-staging branch
       run: |
-        # Create a temporary directory for the site content
-        mkdir -p /tmp/site-content
-        
         # Copy all contents from output directory to temporary directory
         if [ -d "output" ]; then
-          cp -r output/* /tmp/site-content/ 2>/dev/null || true
+          cp -r output/* asf-staging 2>/dev/null || true
         fi
         
-        # Remove all files except .git
-        find . -not -path './.git*' -delete 2>/dev/null || true
-        
-        # Copy site content back to root
-        cp -r /tmp/site-content/* . 2>/dev/null || true
-        
-        # Clean up temporary directory
-        rm -rf /tmp/site-content
-        
         # Add all files
         git add .
         

Reply via email to