From 7c49d905a1d8c627dc2aa1655d1ca56327170733 Mon Sep 17 00:00:00 2001 From: Xi Xu Date: Tue, 25 Nov 2025 18:19:58 +0800 Subject: [PATCH] Add Netlify deployment instructions to README Added Netlify deployment badge and detailed deployment steps to both English and Chinese README files. Also clarified that Workers code is converted to Functions-compatible format for both Vercel and Netlify workflows. --- README.en.md | 27 ++++++++++++++++++++++++++- README.md | 27 ++++++++++++++++++++++++++- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/README.en.md b/README.en.md index a1ccc01..3fddf96 100644 --- a/README.en.md +++ b/README.en.md @@ -8,6 +8,7 @@ [![Cloudflare](https://img.shields.io/badge/Cloudflare-F38020?&logo=cloudflare&logoColor=white)](#deploy-to-cloudflare-workers) [![EdgeOne](https://img.shields.io/badge/EdgeOne-006EFF?&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAACNklEQVR4nJ1W7XHbMAx96ul/lQnCDapOUG3gdIIkG6QjdINOUGeDNhNYmUDuBHIWiNQF/PqDYAxDoMUGdzx+AXgAAQGqSKKAOgAbma8BXMn5DGAv4wlAv6qJ5KVxR3LkOR3NWu9HkcnqzF0EkoMDcsysLd8oOooAb0lOF7wqpYnkzRrgZkVJ8mp0jLFzotscYOC6ZyNjjLbOnTZI7weSjQc4ZoQmkjuSneIdMoADyR9iVKuB0qglWYOT0n9Uys/qPAD4ZHgfAXwzfO/6LLyxcTxbJEdufFi1aEk32l6Z+1Lhep1lQa1aVwI2O3wBsTIFxOoUADzVspgzQp6S1pztATRyvpG5lTNLTUVykssJwF91OQP4bATuAGzVngBexJD0vJW51/u5VpZc4VSUgViMLX1xlIUCoERNLoYE8Ns579S6chTngGYZh1oWjRGoEGOjKSAGP/HovqblDoiJtAfwLPv5xHnqCrbNeK3K8qX9juQDMx3CVpoesXLop7DeATF+2rsKsbo8oizD3zzsjLWk30RHw7N7R5V68/AgMUpeWg9bLLOxL/AniOw1Yp58t/FZi5+mzuFrJJY/Sb6qFzmmV9PMgzBsHUW/eN5gJwdk54Rm4YTXgHPx00p24qEGydFElb3e09nUbpXVuZ+oS/88Z62rJLMelHAJSDqf6LxWSXvS35/+Vr0SlqrPHsBXxOw/o5IGHDLKE4AucS8A7hG7zAIMACryv371WxkfxYhZFD8jFvt+TdE/deK28xBAUlEAAAAASUVORK5CYII=)](#deploy-to-edgeone-pages) [![Vercel](https://img.shields.io/badge/Vercel-000000?&logo=vercel&logoColor=white)](#deploy-to-vercel) +[![Netlify](https://img.shields.io/badge/Netlify-00C7B7?&logo=netlify&logoColor=white)](#deploy-to-netlify) [![Docker](https://img.shields.io/badge/Docker-2496ED?&logo=docker&logoColor=white)](#self-hosted-deployment) [![Podman](https://img.shields.io/badge/Podman-892CA0?&logo=podman&logoColor=white)](#self-hosted-deployment) [![Chromium](https://img.shields.io/badge/Chromium-4285F4?logo=googlechrome&logoColor=white)](#-ecosystem-integration) @@ -2386,7 +2387,7 @@ client = OpenAI( - `VERCEL_TOKEN`: Your Vercel Access Token 4. **Trigger deployment**: - - The repository will automatically convert Workers code to Vercel Functions-compatible format and sync to the `functions` branch + - The repository will automatically convert Workers code to Functions-compatible format and sync to the `functions` branch - Pushing code to the `main` branch will automatically trigger sync and deployment workflows - Modifying only documentation files (`.md`), `LICENSE`, `.gitignore`, etc. will not trigger deployment - You can also manually trigger deployment in the GitHub Actions page @@ -2395,6 +2396,30 @@ client = OpenAI( **Note**: The `functions` branch is automatically generated from the `main` branch. Do not manually edit the `functions` branch as it will be overwritten by the sync workflow. +### Deploy to Netlify + +1. **Fork this repository**: [Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) + +2. **Get Netlify credentials**: + - Visit [Netlify User Settings](https://app.netlify.com/user/applications) to create and note a personal access token + - Visit the project configuration page after creating a new project to note the Project ID + +3. **Configure GitHub Secrets**: + - Go to your GitHub repository → Settings → Secrets and variables → Actions + - Add the following secrets: + - `NETLIFY_AUTH_TOKEN`: Your personal access token + - `NETLIFY_SITE_ID`: Your Project ID + +4. **Trigger deployment**: + - The repository will automatically convert Workers code to Functions-compatible format and sync to the `functions` branch + - Pushing code to the `main` branch will automatically trigger sync and deployment workflows + - Modifying only documentation files (`.md`), `LICENSE`, `.gitignore`, etc. will not trigger deployment + - You can also manually trigger deployment in the GitHub Actions page + +5. **Bind custom domain** (optional): Bind your custom domain in the Netlify console + +**Note**: The `functions` branch is automatically generated from the `main` branch. Do not manually edit the `functions` branch as it will be overwritten by the sync workflow. + ### Self-Hosted Deployment If you prefer to run Xget on your own server, you can use Docker or Podman deployment: diff --git a/README.md b/README.md index 6b77633..19d9386 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ [![Cloudflare](https://img.shields.io/badge/Cloudflare-F38020?&logo=cloudflare&logoColor=white)](#部署到-cloudflare-workers) [![EdgeOne](https://img.shields.io/badge/EdgeOne-006EFF?&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAACNklEQVR4nJ1W7XHbMAx96ul/lQnCDapOUG3gdIIkG6QjdINOUGeDNhNYmUDuBHIWiNQF/PqDYAxDoMUGdzx+AXgAAQGqSKKAOgAbma8BXMn5DGAv4wlAv6qJ5KVxR3LkOR3NWu9HkcnqzF0EkoMDcsysLd8oOooAb0lOF7wqpYnkzRrgZkVJ8mp0jLFzotscYOC6ZyNjjLbOnTZI7weSjQc4ZoQmkjuSneIdMoADyR9iVKuB0qglWYOT0n9Uys/qPAD4ZHgfAXwzfO/6LLyxcTxbJEdufFi1aEk32l6Z+1Lhep1lQa1aVwI2O3wBsTIFxOoUADzVspgzQp6S1pztATRyvpG5lTNLTUVykssJwF91OQP4bATuAGzVngBexJD0vJW51/u5VpZc4VSUgViMLX1xlIUCoERNLoYE8Ns579S6chTngGYZh1oWjRGoEGOjKSAGP/HovqblDoiJtAfwLPv5xHnqCrbNeK3K8qX9juQDMx3CVpoesXLop7DeATF+2rsKsbo8oizD3zzsjLWk30RHw7N7R5V68/AgMUpeWg9bLLOxL/AniOw1Yp58t/FZi5+mzuFrJJY/Sb6qFzmmV9PMgzBsHUW/eN5gJwdk54Rm4YTXgHPx00p24qEGydFElb3e09nUbpXVuZ+oS/88Z62rJLMelHAJSDqf6LxWSXvS35/+Vr0SlqrPHsBXxOw/o5IGHDLKE4AucS8A7hG7zAIMACryv371WxkfxYhZFD8jFvt+TdE/deK28xBAUlEAAAAASUVORK5CYII=)](#部署到-edgeone-pages) [![Vercel](https://img.shields.io/badge/Vercel-000000?&logo=vercel&logoColor=white)](#部署到-vercel) +[![Netlify](https://img.shields.io/badge/Netlify-00C7B7?&logo=netlify&logoColor=white)](#部署到-netlify) [![Docker](https://img.shields.io/badge/Docker-2496ED?&logo=docker&logoColor=white)](#自托管部署) [![Podman](https://img.shields.io/badge/Podman-892CA0?&logo=podman&logoColor=white)](#自托管部署) [![Chromium](https://img.shields.io/badge/Chromium-4285F4?logo=googlechrome&logoColor=white)](#-生态系统集成) @@ -2396,7 +2397,7 @@ client = OpenAI( - `VERCEL_TOKEN`:你的 Vercel Access Token 4. **触发部署**: - - 存储库会自动将 Workers 代码转换为 Vercel Functions 兼容格式并同步到 `functions` 分支 + - 存储库会自动将 Workers 代码转换为 Functions 兼容格式并同步到 `functions` 分支 - 推送代码到 `main` 分支会自动触发同步和部署工作流 - 仅修改文档文件(`.md`)、`LICENSE`、`.gitignore` 等不会触发部署 - 也可以在 GitHub Actions 页面手动触发部署 @@ -2405,6 +2406,30 @@ client = OpenAI( **注意**:`functions` 分支是从 `main` 分支自动生成的。请勿手动编辑 `functions` 分支,因为它会被同步工作流覆盖。 +### 部署到 Netlify + +1. **fork 本存储库**:[Fork xixu-me/Xget](https://github.com/xixu-me/Xget/fork) + +2. **获取 Netlify 凭证**: + - 访问 [Netlify User Settings](https://app.netlify.com/user/applications) 创建并记录 personal access token + - 新建项目后访问项目配置页面记录 Project ID + +3. **配置 GitHub Secrets**: + - 进入你的 GitHub 存储库 → Settings → Secrets and variables → Actions + - 添加以下 secrets: + - `NETLIFY_AUTH_TOKEN`:你的 personal access token + - `NETLIFY_SITE_ID`:你的 Project ID + +4. **触发部署**: + - 存储库会自动将 Workers 代码转换为 Functions 兼容格式并同步到 `functions` 分支 + - 推送代码到 `main` 分支会自动触发同步和部署工作流 + - 仅修改文档文件(`.md`)、`LICENSE`、`.gitignore` 等不会触发部署 + - 也可以在 GitHub Actions 页面手动触发部署 + +5. **绑定自定义域名**(可选):在 Netlify 控制台中绑定你的自定义域名 + +**注意**:`functions` 分支是从 `main` 分支自动生成的。请勿手动编辑 `functions` 分支,因为它会被同步工作流覆盖。 + ### 自托管部署 如果你希望在自己的服务器上运行 Xget,可以使用 Docker 或 Podman 部署: