From aa564e34d8bf7b43fe2886f06e756aef824b50ec Mon Sep 17 00:00:00 2001 From: x x Date: Thu, 1 Oct 2026 12:42:16 +0800 Subject: [PATCH 1/3] =?UTF-8?q?chore(docs):=20=E8=BF=81=E7=A7=BB=E5=88=B0?= =?UTF-8?q?=20Cloudflare=20Pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docs.yml | 54 ++++++++++++++++++++++---------------- README.md | 6 ++--- README.zh-CN.md | 6 ++--- docusaurus.config.ts | 5 ++-- 4 files changed, 40 insertions(+), 31 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index fabaa68..d61b3b0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -9,15 +9,13 @@ on: permissions: contents: read - pages: write - id-token: write concurrency: - group: pages + group: docs-${{ github.ref }} cancel-in-progress: true jobs: - build: + check: runs-on: ubuntu-latest steps: - name: Checkout @@ -40,24 +38,36 @@ jobs: - name: Check and build run: pnpm check - - name: Configure Pages - if: github.event_name != 'pull_request' - uses: actions/configure-pages@v5 - - - name: Upload Pages artifact - if: github.event_name != 'pull_request' - uses: actions/upload-pages-artifact@v3 - with: - path: build - deploy: - if: github.event_name != 'pull_request' - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository + needs: check runs-on: ubuntu-latest - needs: build steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + run_install: false + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build + run: pnpm build + + - name: Deploy to Cloudflare Pages + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }} + run: >- + npx --yes wrangler@4.145.0 pages deploy build + --project-name=agentdock-docs + --branch=${{ github.head_ref || github.ref_name }} diff --git a/README.md b/README.md index f1fe627..e877175 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ English | [简体中文](./README.zh-CN.md) Official public documentation for AgentDock, built with Docusaurus, TypeScript, and pnpm. -- Documentation: -- Simplified Chinese documentation: +- Documentation: +- Simplified Chinese documentation: - AgentDock source: This repository is the source of truth for installation, configuration, concepts, operations, and troubleshooting. The AgentDock source repository README keeps only the project overview and shortest onboarding path. @@ -85,7 +85,7 @@ The site still builds and deploys normally when search variables are absent. ## Deployment -`.github/workflows/docs.yml` checks pull requests and publishes GitHub Pages after `main` changes. +`.github/workflows/docs.yml` validates pull requests and `main` updates. Same-repository pull requests get Cloudflare Pages preview deployments, and validated `main` updates are deployed to production with Wrangler. ## License diff --git a/README.zh-CN.md b/README.zh-CN.md index 799a3b1..6502029 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -4,8 +4,8 @@ AgentDock 官方公开文档,使用 Docusaurus、TypeScript 和 pnpm 构建。 -- 线上站点: -- 简体中文站点: +- 线上站点: +- 简体中文站点: - AgentDock 源码: 安装、配置、概念、运维和排障以本仓库为准;AgentDock 源码仓库 README 只保留项目概览和最短使用入口。 @@ -85,7 +85,7 @@ pnpm build ## 部署 -`.github/workflows/docs.yml` 会在 Pull Request 中执行检查,并在 `main` 更新后发布 GitHub Pages。 +`.github/workflows/docs.yml` 会在 Pull Request 和 `main` 更新时执行检查。同仓库 Pull Request 会自动发布 Cloudflare Pages 预览部署;`main` 验证通过后会通过 Wrangler 发布生产站点。 ## License diff --git a/docusaurus.config.ts b/docusaurus.config.ts index de09ec5..0f511d3 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -20,11 +20,10 @@ const config: Config = { title: 'AgentDock', tagline: 'Connect AI agents to tools on your computers and servers', favicon: 'img/favicon.svg', - url: 'https://uvwt.github.io', - baseUrl: '/agentdock-docs/', + url: 'https://agentdock-docs-8bs.pages.dev', + baseUrl: '/', organizationName: 'uvwt', projectName: 'agentdock-docs', - deploymentBranch: 'gh-pages', trailingSlash: false, onBrokenLinks: 'throw', onBrokenAnchors: 'throw', From 10c13b678d62dab7d41ef64238af4030e887db9a Mon Sep 17 00:00:00 2001 From: x x Date: Thu, 1 Oct 2026 14:55:00 +0800 Subject: [PATCH 2/3] =?UTF-8?q?chore(docs):=20=E4=BD=BF=E7=94=A8=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E6=96=87=E6=A1=A3=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docs.yml | 9 ++++++++- README.md | 6 +++--- README.zh-CN.md | 6 +++--- docusaurus.config.ts | 4 ++-- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d61b3b0..98ae31c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -63,11 +63,18 @@ jobs: - name: Build run: pnpm build + - name: Prepare Pages artifact + run: | + rm -rf pages-dist + mkdir -p pages-dist/agentdock + cp -R build/. pages-dist/agentdock/ + printf '/ /agentdock/ 302\n' > pages-dist/_redirects + - name: Deploy to Cloudflare Pages env: CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }} run: >- - npx --yes wrangler@4.145.0 pages deploy build + npx --yes wrangler@4.145.0 pages deploy pages-dist --project-name=agentdock-docs --branch=${{ github.head_ref || github.ref_name }} diff --git a/README.md b/README.md index e877175..d233a80 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ English | [简体中文](./README.zh-CN.md) Official public documentation for AgentDock, built with Docusaurus, TypeScript, and pnpm. -- Documentation: -- Simplified Chinese documentation: +- Documentation: +- Simplified Chinese documentation: - AgentDock source: This repository is the source of truth for installation, configuration, concepts, operations, and troubleshooting. The AgentDock source repository README keeps only the project overview and shortest onboarding path. @@ -26,7 +26,7 @@ pnpm start -- --locale zh-CN The local development server runs at: ```text -http://localhost:3000/agentdock-docs/ +http://localhost:3000/agentdock/ ``` ## Quality checks diff --git a/README.zh-CN.md b/README.zh-CN.md index 6502029..0b98fe6 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -4,8 +4,8 @@ AgentDock 官方公开文档,使用 Docusaurus、TypeScript 和 pnpm 构建。 -- 线上站点: -- 简体中文站点: +- 线上站点: +- 简体中文站点: - AgentDock 源码: 安装、配置、概念、运维和排障以本仓库为准;AgentDock 源码仓库 README 只保留项目概览和最短使用入口。 @@ -26,7 +26,7 @@ pnpm start -- --locale zh-CN 本地开发服务器默认运行在: ```text -http://localhost:3000/agentdock-docs/ +http://localhost:3000/agentdock/ ``` ## 质量检查 diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 0f511d3..3e8ac57 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -20,8 +20,8 @@ const config: Config = { title: 'AgentDock', tagline: 'Connect AI agents to tools on your computers and servers', favicon: 'img/favicon.svg', - url: 'https://agentdock-docs-8bs.pages.dev', - baseUrl: '/', + url: 'https://docs.nexusdock.co', + baseUrl: '/agentdock/', organizationName: 'uvwt', projectName: 'agentdock-docs', trailingSlash: false, From c16c7d541a66e65f6f963da62efc7787f873d8c6 Mon Sep 17 00:00:00 2001 From: x x Date: Thu, 1 Oct 2026 14:58:17 +0800 Subject: [PATCH 3/3] =?UTF-8?q?ci(docs):=20=E4=BF=9D=E6=8C=81=E5=BF=85?= =?UTF-8?q?=E9=9C=80=E6=9E=84=E5=BB=BA=E6=A3=80=E6=9F=A5=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 98ae31c..86eb16e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,7 +15,7 @@ concurrency: cancel-in-progress: true jobs: - check: + build: runs-on: ubuntu-latest steps: - name: Checkout @@ -40,7 +40,7 @@ jobs: deploy: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository - needs: check + needs: build runs-on: ubuntu-latest steps: - name: Checkout