Files
sisai-world/etc/deploy_cluster.sh
2025-10-06 21:31:13 +09:00

31 lines
747 B
Bash
Executable File

# Define the path you want to deploy
DEPLOY_PATH="/Users/dqj/HDD/amiProProjects/amiprorepo/sisai-world"
# Create a temporary directory
TEMP_DIR=$(mktemp -d)
# Copy the specific path to the temporary directory
cp -r $DEPLOY_PATH/* $TEMP_DIR
# Navigate to the temporary directory
cd $TEMP_DIR
# Initialize a new Git repository
git init
# Add all files to the repository
git add .
# Commit the changes
git commit -m "Deploy sisai world"
# Add remote server repository
git remote add server1 ssh://centos@153.127.28.185/~/cicd/sisai-world-cicd.git
git remote add server2 ssh://centos@133.242.149.212/~/cicd/sisai-world-cicd.git
# Push the code to the remote server
git push --force server1 main
git push --force server2 main
rm -rf $TEMP_DIR