This commit is contained in:
parent
25624fd96b
commit
44598d9baa
@ -35,13 +35,13 @@ jobs:
|
||||
# 配置 SSH 🔑
|
||||
echo "$DEPLOY_KEY" > ~/.ssh/id_rsa
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
ssh-keyscan -H $SERVER_IP >> ~/.ssh/known_hosts
|
||||
ssh-keyscan -H 8.137.89.177 >> ~/.ssh/known_hosts
|
||||
|
||||
# 上传 JAR 包到服务器 📤
|
||||
scp target/*.jar $USER@$SERVER_IP:/jinduguanli/app.jar
|
||||
scp target/*.jar root@8.137.89.177:/jinduguanli/app.jar
|
||||
|
||||
# 在服务器上重启应用 🔄
|
||||
ssh $USER@$SERVER_IP << 'EOF'
|
||||
ssh root@8.137.89.177 << 'EOF'
|
||||
cd /jinduguanli
|
||||
pkill -f 'java -jar' || true
|
||||
nohup java -jar app.jar --spring.config.location=/huertian/application.yml> /huertian/log/app.log 2>&1 &
|
||||
|
Loading…
Reference in New Issue
Block a user