29 lines
635 B
Bash
Executable File
29 lines
635 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 server ssh://centos@133.242.134.37/~/cicd/sisai-world-cicd.git
|
|
|
|
# Push the code to the remote server
|
|
git push --force server main
|
|
|
|
rm -rf $TEMP_DIR
|