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:
|
||||
# 检出代码
|
||||
- name: 拉取代码
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# 设置JDK环境
|
||||
- name: Set up JDK 8
|
||||
- name: 部署jdk8
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'adopt'
|
||||
# 设置maven环境
|
||||
- name: Set up Maven
|
||||
- name: 部署maven
|
||||
uses: stCarolas/setup-maven@v4.5
|
||||
with:
|
||||
maven-version: '3.8.6'
|
||||
# 缓存Maven依赖
|
||||
- name: Cache Maven packages
|
||||
- name: 设置maven缓存
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2
|
||||
@ -33,11 +34,11 @@ jobs:
|
||||
restore-keys: ${{ runner.os }}-m2
|
||||
|
||||
# 使用Maven打包
|
||||
- name: Build with Maven
|
||||
- name: 打包
|
||||
run: mvn clean package -DskipTests
|
||||
|
||||
# 将JAR包传输到服务器部署
|
||||
- name: Deploy to Server
|
||||
- name: 推送
|
||||
uses: appleboy/scp-action@master
|
||||
with:
|
||||
host: ${{ secrets.SERVER_HOST }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user