From 92fef384e607e240c5d1f86774cdd59b274ad725 Mon Sep 17 00:00:00 2001 From: Wo254992 <110774618+Wo254992@users.noreply.github.com> Date: Thu, 30 Apr 2026 23:39:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=A6=BB=20HF=20README=20=E5=85=83?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=EF=BC=9A=E6=96=B0=E5=A2=9E=20README.hf.md?= =?UTF-8?q?=EF=BC=8Csync=5Fhf.yml=20=E6=8E=A8=E9=80=81=E5=89=8D=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=9B=BF=E6=8D=A2=20(#292)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 参考 hf-space-clean-readme 分支做法: - README.md 保持干净文档,不放 HF YAML frontmatter - README.hf.md 专门存放 HF metadata(title/emoji/sdk/port) - GitHub Actions sync_hf.yml 在推送到 HF Space 前临时 cp 替换 --- .github/workflows/sync_hf.yml | 8 ++++++++ README.hf.md | 16 ++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 README.hf.md diff --git a/.github/workflows/sync_hf.yml b/.github/workflows/sync_hf.yml index fe5cc46..f39404a 100644 --- a/.github/workflows/sync_hf.yml +++ b/.github/workflows/sync_hf.yml @@ -17,6 +17,14 @@ jobs: fetch-depth: 0 lfs: true + - name: Prepare Hugging Face README + run: | + cp README.hf.md README.md + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add README.md + git commit -m "准备 Hugging Face Space 元数据" --allow-empty + - name: Push to Hugging Face Space env: HF_TOKEN: ${{ secrets.HF_TOKEN }} diff --git a/README.hf.md b/README.hf.md new file mode 100644 index 0000000..e3886e8 --- /dev/null +++ b/README.hf.md @@ -0,0 +1,16 @@ +--- +title: Danmu API +emoji: 🚀 +colorFrom: blue +colorTo: purple +sdk: docker +app_port: 9321 +pinned: false +--- + +# Danmu API + +这是 danmu_api 的 Hugging Face Space 部署入口。 + +完整文档请看 GitHub 仓库: +https://github.com/huangxd-/danmu_api