更新 .gitea/workflows/deploy.yml
Some checks failed
构建并部署 Spring Boot 应用 / build-and-deploy (push) Failing after 0s
Some checks failed
构建并部署 Spring Boot 应用 / build-and-deploy (push) Failing after 0s
使用gitea环境
This commit is contained in:
@@ -5,29 +5,29 @@ jobs:
|
|||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
# 1. 检出代码 - 使用标准的 checkout action
|
# 1. 检出代码 - 使用完整的GitHub URL
|
||||||
- name: 检出代码
|
- name: 检出代码
|
||||||
uses: actions/checkout@v4
|
uses: https://gitea.com/actions/checkout
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
# 2. 设置 Java 环境 - 使用标准的 setup-java action
|
# 2. 设置 Java 环境 - 使用完整的GitHub URL
|
||||||
- name: 设置 JDK 17
|
- name: 设置 JDK 17
|
||||||
uses: actions/setup-java@v4
|
uses: https://gitea.com/actions/setup-java
|
||||||
with:
|
with:
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
|
|
||||||
# 3. 设置 Node.js 环境(如果项目需要)
|
# 3. 设置 Node.js 环境 - 使用完整的GitHub URL
|
||||||
- name: 设置 Node.js 环境
|
- name: 设置 Node.js 环境
|
||||||
uses: actions/setup-node@v4
|
uses: https://gitea.com/actions/setup-node
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
cache: 'npm' # 启用 npm 缓存加速构建
|
cache: 'npm'
|
||||||
|
|
||||||
# 4. 缓存 Maven 依赖项以加速构建
|
# 4. 缓存 Maven 依赖项 - 使用完整的GitHub URL
|
||||||
- name: 缓存 Maven 依赖
|
- name: 缓存 Maven 依赖
|
||||||
uses: actions/cache@v3
|
uses: https://gitea.com/actions/cache
|
||||||
with:
|
with:
|
||||||
path: ~/.m2/repository
|
path: ~/.m2/repository
|
||||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||||
|
Reference in New Issue
Block a user