This commit is contained in:
@@ -1,46 +1,46 @@
|
|||||||
|
|
||||||
name: 构建项目
|
# name: 构建项目
|
||||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
# run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||||
|
|
||||||
# 2. 触发条件 (on)
|
# # 2. 触发条件 (on)
|
||||||
on: [push]
|
# on: [push]
|
||||||
|
|
||||||
# 3. 作业定义 (jobs)
|
# # 3. 作业定义 (jobs)
|
||||||
jobs:
|
# jobs:
|
||||||
构建:
|
# 构建:
|
||||||
# 4. 运行器选择 (runs-on)
|
# # 4. 运行器选择 (runs-on)
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
|
|
||||||
# 5. 步骤序列 (steps)
|
# # 5. 步骤序列 (steps)
|
||||||
steps:
|
# steps:
|
||||||
# 步骤 1: 检出代码
|
# # 步骤 1: 检出代码
|
||||||
- name: 检出代码
|
# - name: 检出代码
|
||||||
uses: https://gitea.com/actions/checkout@v5
|
# uses: https://gitea.com/actions/checkout@v5
|
||||||
with:
|
# with:
|
||||||
github-server-url: 'https://git.bmycode.help'
|
# github-server-url: 'https://git.bmycode.help'
|
||||||
|
|
||||||
|
|
||||||
- name: 显示目录
|
# - name: 显示目录
|
||||||
run: ls -la
|
# run: ls -la
|
||||||
|
|
||||||
# 步骤 2: 设置 Node.js 环境
|
# # 步骤 2: 设置 Node.js 环境
|
||||||
- name: 设置 Node.js 环境
|
# - name: 设置 Node.js 环境
|
||||||
uses: https://gitea.com/actions/setup-node@v4
|
# uses: https://gitea.com/actions/setup-node@v4
|
||||||
with:
|
# with:
|
||||||
node-version: 18
|
# node-version: 18
|
||||||
cache: 'npm'
|
# cache: 'npm'
|
||||||
|
|
||||||
# 步骤 3: 安装依赖
|
# # 步骤 3: 安装依赖
|
||||||
- name: 安装依赖
|
# - name: 安装依赖
|
||||||
run: npm ci
|
# run: npm ci
|
||||||
|
|
||||||
# 步骤 4: 执行打包命令
|
# # 步骤 4: 执行打包命令
|
||||||
- name: 执行Build构建
|
# - name: 执行Build构建
|
||||||
run: npm run build
|
# run: npm run build
|
||||||
|
|
||||||
# 步骤 5: 上传打包产物
|
# # 步骤 5: 上传打包产物
|
||||||
- name: 上传构建产物
|
# - name: 上传构建产物
|
||||||
uses: https://gitea.com/actions/upload-artifact@v4
|
# uses: https://gitea.com/actions/upload-artifact@v4
|
||||||
with:
|
# with:
|
||||||
name: dist
|
# name: dist
|
||||||
path: dist/
|
# path: dist/
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
# name: Gitea Actions Demo
|
name: Gitea Actions Demo
|
||||||
# run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||||
# on: [push]
|
on: [push]
|
||||||
|
|
||||||
# jobs:
|
jobs:
|
||||||
# Explore-Gitea-Actions:
|
Explore-Gitea-Actions:
|
||||||
# runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# steps:
|
steps:
|
||||||
# - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||||
# - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||||
# - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||||
# - name: Check out repository code
|
- name: Check out repository code
|
||||||
# uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
# - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||||
# - run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||||
# - name: List files in the repository
|
- name: List files in the repository
|
||||||
# run: |
|
run: |
|
||||||
# ls ${{ gitea.workspace }}
|
ls ${{ gitea.workspace }}
|
||||||
# - run: echo "🍏 This job's status is ${{ job.status }}."
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||||
Reference in New Issue
Block a user