重新使用密码方式远程部署
Some checks are pending
Build and Deploy Spring Boot / build-and-deploy (push) Waiting to run
Some checks are pending
Build and Deploy Spring Boot / build-and-deploy (push) Waiting to run
This commit is contained in:
parent
afcefe40a8
commit
fa5166e7fc
@ -15,7 +15,7 @@ jobs:
|
||||
|
||||
# 设置JDK环境
|
||||
- name: Set up JDK 8
|
||||
uses: actions/setup-java@v2
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'adopt'
|
||||
@ -36,15 +36,13 @@ jobs:
|
||||
- name: Build with Maven
|
||||
run: mvn clean package -DskipTests
|
||||
|
||||
# 使用 scp-action 传输文件
|
||||
- name: Copy JAR to Server
|
||||
# 将JAR包传输到服务器并部署
|
||||
- name: Deploy to Server
|
||||
uses: appleboy/scp-action@master
|
||||
with:
|
||||
host: ${{ secrets.SERVER_HOST }}
|
||||
port: ${{ secrets.SERVER_PORT }}
|
||||
username: ${{ secrets.SERVER_USERNAME }}
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
key_passphrase: ${{ secrets.SSH_KEY_PASSPHRASE }}
|
||||
password: ${{ secrets.SERVER_PASSWORD }}
|
||||
port: ${{ secrets.SERVER_PORT }}
|
||||
source: "target/*.jar"
|
||||
target: "/home/tools/testActions"
|
||||
strip_components: 1
|
Loading…
x
Reference in New Issue
Block a user