devops各步骤使用中文
Some checks failed
Build and Deploy Spring Boot / build-and-deploy (push) Failing after 1s

This commit is contained in:
hxuanyu 2024-11-04 17:01:51 +08:00
parent 3c5a3b4c27
commit bd339b928f

View File

@ -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 }}