Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 38 additions & 21 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ on:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
group: docs-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand All @@ -40,24 +38,43 @@ 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 }}
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
needs: build
runs-on: ubuntu-latest
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: 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 pages-dist
--project-name=agentdock-docs
--branch=${{ github.head_ref || github.ref_name }}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ English | [简体中文](./README.zh-CN.md)

Official public documentation for AgentDock, built with Docusaurus, TypeScript, and pnpm.

- Documentation: <https://uvwt.github.io/agentdock-docs/>
- Simplified Chinese documentation: <https://uvwt.github.io/agentdock-docs/zh-CN/>
- Documentation: <https://docs.nexusdock.co/agentdock/>
- Simplified Chinese documentation: <https://docs.nexusdock.co/agentdock/zh-CN/>
- AgentDock source: <https://github.com/uvwt/agentdock>

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.
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

AgentDock 官方公开文档,使用 Docusaurus、TypeScript 和 pnpm 构建。

- 线上站点:<https://uvwt.github.io/agentdock-docs/>
- 简体中文站点:<https://uvwt.github.io/agentdock-docs/zh-CN/>
- 线上站点:<https://docs.nexusdock.co/agentdock/>
- 简体中文站点:<https://docs.nexusdock.co/agentdock/zh-CN/>
- AgentDock 源码:<https://github.com/uvwt/agentdock>

安装、配置、概念、运维和排障以本仓库为准;AgentDock 源码仓库 README 只保留项目概览和最短使用入口。
Expand All @@ -26,7 +26,7 @@ pnpm start -- --locale zh-CN
本地开发服务器默认运行在:

```text
http://localhost:3000/agentdock-docs/
http://localhost:3000/agentdock/
```

## 质量检查
Expand Down Expand Up @@ -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

Expand Down
5 changes: 2 additions & 3 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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://docs.nexusdock.co',
baseUrl: '/agentdock/',
organizationName: 'uvwt',
projectName: 'agentdock-docs',
deploymentBranch: 'gh-pages',
trailingSlash: false,
onBrokenLinks: 'throw',
onBrokenAnchors: 'throw',
Expand Down
Loading