更新 .gitea/workflows/deploy.yml
Some checks failed
构建并部署 Spring Boot 应用 / build-and-deploy (push) Failing after 0s

使用gitea环境
This commit is contained in:
2025-09-26 05:37:53 +00:00
parent 828eb8bc03
commit 88a2b3f799

View File

@@ -5,29 +5,29 @@ jobs:
build-and-deploy:
runs-on: ubuntu-24.04
steps:
# 1. 检出代码 - 使用标准的 checkout action
# 1. 检出代码 - 使用完整的GitHub URL
- name: 检出代码
uses: actions/checkout@v4
uses: https://gitea.com/actions/checkout
with:
fetch-depth: 1
# 2. 设置 Java 环境 - 使用标准的 setup-java action
# 2. 设置 Java 环境 - 使用完整的GitHub URL
- name: 设置 JDK 17
uses: actions/setup-java@v4
uses: https://gitea.com/actions/setup-java
with:
java-version: '17'
distribution: 'temurin'
# 3. 设置 Node.js 环境(如果项目需要)
# 3. 设置 Node.js 环境 - 使用完整的GitHub URL
- name: 设置 Node.js 环境
uses: actions/setup-node@v4
uses: https://gitea.com/actions/setup-node
with:
node-version: '20'
cache: 'npm' # 启用 npm 缓存加速构建
cache: 'npm'
# 4. 缓存 Maven 依赖项以加速构建
# 4. 缓存 Maven 依赖项 - 使用完整的GitHub URL
- name: 缓存 Maven 依赖
uses: actions/cache@v3
uses: https://gitea.com/actions/cache
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}