File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -38,11 +38,33 @@ jobs:
3838          set -x 
3939          git config --global user.name "jonhealy1" 
4040          git config --global user.email "[email protected] " 41-           git remote add deploy https://jonhealy1:${DEPLOY_TOKEN}@github.com/stacchain/stacchain.github.io.git 
41+ 
42+           # Remove existing deploy remote if it exists to avoid conflicts 
43+           git remote remove deploy || true  
44+ 
45+           # Add deploy remote using PAT for authentication 
46+           git remote add deploy https://x-access-token:${DEPLOY_TOKEN}@github.com/stacchain/stacchain.github.io.git 
47+ 
48+           # Verify remote URLs 
49+           git remote -v 
50+ 
51+           # Fetch the deploy branch 
4252          git fetch deploy 
53+ 
54+           # Checkout to deploy/main or create an orphan branch if it doesn't exist 
4355          git checkout deploy/main || git checkout --orphan deploy/main 
56+ 
57+           # Remove all existing files 
4458          git rm -rf . 
59+ 
60+           # Copy build files to the repository root 
4561          cp -R build/* . 
62+ 
63+           # Add all changes 
4664          git add . 
65+ 
66+           # Commit changes 
4767          git commit -m "Deploy React app to GitHub Pages [skip ci]" 
68+ 
69+           # Push changes to deploy/main with force 
4870          git push deploy deploy/main --force 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments