更新 README.md 文件,增加两种使用方法的说明,添加 fork 项目的相关信息,并更新反代设置的说明。同时更新 GitHub Actions 配置,忽略所有 .yml 文件的变更。

This commit is contained in:
wood chen 2025-04-19 17:58:47 +08:00
parent 106687c8c2
commit 807743aaf9
3 changed files with 61 additions and 2 deletions

View File

@ -6,6 +6,7 @@ on:
- main - main
paths-ignore: paths-ignore:
- 'README.md' - 'README.md'
- '**.yml'
jobs: jobs:
build-and-deploy: build-and-deploy:

45
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: Create Release
on:
push:
tags:
- 'v*'
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: npm install --force
- name: Build project
run: npm run build
- name: Create zip archive
run: |
cd dist
zip -r ../nezha-dash-v1.zip .
cd ..
- name: Extract tag name
id: get_tag
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
files: nezha-dash-v1.zip
name: Release ${{ env.TAG_NAME }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -6,11 +6,24 @@
2. 隐藏登录按钮 2. 隐藏登录按钮
3. 可以把面板和nezha容器放到不同的服务器 3. 可以把面板和nezha容器放到不同的服务器
## 使用方法 ## 使用方法1
1. 下载, `npm install --force`, 然后打包 `npm run build` 1. 下载, `npm install --force`, 然后打包 `npm run build`
2. 把打包后的文件放到网站根目录 2. 把打包后的文件放到网站根目录
3. 网站设置一个api反代, nginx配置大概如下:
## 使用方法2
从Release下载文件, 解压到网站根目录
## fork项目
1. fork后可以修改名称和logo等信息
2. 改完自行打包
## 设置反代
网站设置一个api反代, nginx配置大概如下:
```nginx ```nginx
location ^~ /api { location ^~ /api {