devops各步骤使用中文
Some checks failed
Build and Deploy Spring Boot / build-and-deploy (push) Failing after 1s
Some checks failed
Build and Deploy Spring Boot / build-and-deploy (push) Failing after 1s
This commit is contained in:
parent
3c5a3b4c27
commit
bd339b928f
@ -11,21 +11,22 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
# 检出代码
|
# 检出代码
|
||||||
|
- name: 拉取代码
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# 设置JDK环境
|
# 设置JDK环境
|
||||||
- name: Set up JDK 8
|
- name: 部署jdk8
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
java-version: '8'
|
java-version: '8'
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
# 设置maven环境
|
# 设置maven环境
|
||||||
- name: Set up Maven
|
- name: 部署maven
|
||||||
uses: stCarolas/setup-maven@v4.5
|
uses: stCarolas/setup-maven@v4.5
|
||||||
with:
|
with:
|
||||||
maven-version: '3.8.6'
|
maven-version: '3.8.6'
|
||||||
# 缓存Maven依赖
|
# 缓存Maven依赖
|
||||||
- name: Cache Maven packages
|
- name: 设置maven缓存
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.m2
|
path: ~/.m2
|
||||||
@ -33,11 +34,11 @@ jobs:
|
|||||||
restore-keys: ${{ runner.os }}-m2
|
restore-keys: ${{ runner.os }}-m2
|
||||||
|
|
||||||
# 使用Maven打包
|
# 使用Maven打包
|
||||||
- name: Build with Maven
|
- name: 打包
|
||||||
run: mvn clean package -DskipTests
|
run: mvn clean package -DskipTests
|
||||||
|
|
||||||
# 将JAR包传输到服务器部署
|
# 将JAR包传输到服务器部署
|
||||||
- name: Deploy to Server
|
- name: 推送
|
||||||
uses: appleboy/scp-action@master
|
uses: appleboy/scp-action@master
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.SERVER_HOST }}
|
host: ${{ secrets.SERVER_HOST }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user