This commit is contained in:
@@ -1,43 +1,43 @@
|
|||||||
|
|
||||||
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@v4
|
# uses: https://gitea.com/actions/checkout@v4
|
||||||
|
|
||||||
- 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: 22
|
# node-version: 22
|
||||||
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@v3
|
# uses: https://gitea.com/actions/upload-artifact@v3
|
||||||
with:
|
# with:
|
||||||
name: dist
|
# name: dist
|
||||||
path: dist/
|
# path: dist/
|
||||||
@@ -16,6 +16,15 @@ jobs:
|
|||||||
|
|
||||||
# 步骤序列
|
# 步骤序列
|
||||||
steps:
|
steps:
|
||||||
|
- name: 执行远程 SSH 命令(密码认证)
|
||||||
|
uses: appleboy/ssh-action@v1
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.HOST }}
|
||||||
|
username: ${{ secrets.USERNAME }}
|
||||||
|
password: ${{ secrets.PASSWORD }}
|
||||||
|
port: ${{ secrets.PORT }}
|
||||||
|
script: whoami
|
||||||
|
|
||||||
# 步骤1:输出事件信息
|
# 步骤1:输出事件信息
|
||||||
- run: echo "🎉 该作业由 ${{ gitea.event_name }} 事件自动触发。"
|
- run: echo "🎉 该作业由 ${{ gitea.event_name }} 事件自动触发。"
|
||||||
|
|
||||||
|
|||||||
14
data/.runner
14
data/.runner
@@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"WARNING": "This file is automatically generated by act-runner. Do not edit it manually unless you know what you are doing. Removing this file will cause act runner to re-register as a new runner.",
|
|
||||||
"id": 136,
|
|
||||||
"uuid": "7369696a-3bf3-433c-bc2b-feed3a5e2b37",
|
|
||||||
"name": "c94ca9934df2",
|
|
||||||
"token": "6024bd7d31b62263604bfda44f0b110f454431dd",
|
|
||||||
"address": "https://git.bmycode.help",
|
|
||||||
"labels": [
|
|
||||||
"ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest",
|
|
||||||
"ubuntu-22.04:docker://docker.gitea.com/runner-images:ubuntu-22.04",
|
|
||||||
"ubuntu-20.04:docker://docker.gitea.com/runner-images:ubuntu-20.04"
|
|
||||||
],
|
|
||||||
"ephemeral": false
|
|
||||||
}
|
|
||||||
@@ -36,7 +36,7 @@ services:
|
|||||||
GITEA_RUNNER_REGISTRATION_TOKEN: WFiO5JDwz7CHnk7fMGJYMcSITU81CLXuI7Ofg10e
|
GITEA_RUNNER_REGISTRATION_TOKEN: WFiO5JDwz7CHnk7fMGJYMcSITU81CLXuI7Ofg10e
|
||||||
volumes:
|
volumes:
|
||||||
- ./config.yaml:/config.yaml
|
- ./config.yaml:/config.yaml
|
||||||
- ./data:/data
|
- runner-data:/data
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
Reference in New Issue
Block a user