---
title: 构建、部署与分析概览
sidebarTitle: 构建与部署概览
description: >-
  了解文档如何从 git push 变为线上网站：CLI、构建流程、托管与自定义域名，以及每个页面自带的分析功能。
---

> **For AI agents:** the complete documentation index is at [llms.txt](/docs/llms.txt). Append `.md` to any page URL for its markdown version.

你可以推送到 GitHub（或运行 `jamdesk deploy`），Jamdesk 会构建网站，随后更改即可上线。这就是完整流程。本节页面将分别介绍其中的各个部分：日常使用的 CLI、构建期间发生的操作、网站的托管位置，以及 Jamdesk 无需额外脚本便为每个页面收集的分析数据。

<Tip>
  **构建失败？** [构建故障排除](/cn/builds/troubleshooting)可根据常见错误消息匹配原因和解决方案。
</Tip>

## CLI

开源 CLI 可在本地预览文档、验证配置、检查失效链接并进行部署。

<Columns cols={2}>
  <Card title="CLI 概览" icon="terminal" href="/cn/cli/overview">
    安装 CLI 并了解核心命令
  </Card>
  <Card title="身份验证" icon="key" href="/cn/cli/authentication">
    登录、令牌存储和会话管理
  </Card>
  <Card title="CLI 部署" icon="upload" href="/cn/cli/deploy">
    了解 `jamdesk deploy` 如何打包、上传并构建文档
  </Card>
  <Card title="修复失效链接" icon="link-slash" href="/cn/cli/fix-broken-links">
    `jamdesk fix` 会先预览更改，然后修复失效的内部链接
  </Card>
</Columns>

## 构建工作流

<Columns cols={3}>
  <Card title="部署工作流" icon="arrows-spin" href="/cn/development/deployment">
    GitHub 推送、CLI 部署、状态跟踪和手动重新构建
  </Card>
  <Card title="触发构建" icon="play" href="/cn/builds/triggering">
    推送时自动构建、从仪表板手动构建，以及去抖和队列机制
  </Card>
  <Card title="监控构建" icon="wave-pulse" href="/cn/builds/monitoring">
    实时进度、构建阶段和结构化日志
  </Card>
  <Card title="使用 AI 修复" icon="wand-magic-sparkles" href="/cn/builds/fix-with-ai">
    在构建仪表板中查看并应用 AI 建议的修复
  </Card>
  <Card title="自动转换图像" icon="file-image" href="/cn/builds/image-optimization">
    在构建时将 PNG 和 JPG 转换为 WebP
  </Card>
  <Card title="导出 PDF" icon="file-pdf" href="/cn/builds/pdf-export">
    将整个网站导出为单个 PDF
  </Card>
</Columns>

## 托管与域名

网站默认地址为 `yourproject.jamdesk.app`。准备就绪后，你可以通过自己的域名提供网站，也可以在现有网站的 `/docs` 路径下提供网站。

<Columns cols={3}>
  <Card title="部署概览" icon="globe" href="/cn/deploy/overview">
    子域名、自定义域名或子路径：比较各种托管选项
  </Card>
  <Card title="构建与部署生命周期" icon="timeline" href="/cn/deploy/lifecycle">
    从 git push 到网站上线的完整流程
  </Card>
  <Card title="自定义域名" icon="link" href="/cn/deploy/custom-domains">
    配置 DNS，通过自己的域名并使用 SSL 提供文档
  </Card>
  <Card title="仅使用自定义域名" icon="ban" href="/cn/deploy/custom-domain-only">
    停止 Jamdesk 子域名直接响应请求
  </Card>
  <Card title="Jamdesk 子域名" icon="signs-post" href="/cn/deploy/subdomains">
    命名规则以及如何更改默认子域名
  </Card>
  <Card title="子路径托管" icon="folder-open" href="/cn/deploy/subpath-hosting">
    在 `yoursite.com/docs` 托管，而不是使用单独的子域名
  </Card>
</Columns>

## 平台指南

针对通过现有基础设施代理 `/docs` 的配置进行测试。

<Columns cols={2}>
  <Card title="AWS Route 53 与 CloudFront" icon="aws" href="/cn/deploy/aws">
    分发设置和源站配置
  </Card>
  <Card title="Cloudflare Workers" icon="cloud" href="/cn/deploy/cloudflare">
    Worker 设置以及 `/docs` 流量的路由
  </Card>
  <Card title="反向代理" icon="server" href="/cn/deploy/reverse-proxy">
    nginx、Apache、Caddy、Traefik 或 HAProxy
  </Card>
  <Card title="Vercel" icon="triangle" href="/cn/deploy/vercel">
    使用 `jd_proxy` 标记的 `vercel.json` 重写规则
  </Card>
</Columns>

## 分析与监控

<Columns cols={2}>
  <Card title="分析概览" icon="gauge-high" href="/cn/setup/analytics-overview">
    无需外部脚本即可查看页面浏览量、流量来源和搜索查询
  </Card>
  <Card title="项目分析" icon="chart-line" href="/cn/setup/project-analytics">
    以隐私为重点了解网站访客行为
  </Card>
  <Card title="搜索分析" icon="magnifying-glass-chart" href="/cn/setup/search-analytics">
    了解读者搜索的内容及其揭示的内容缺口
  </Card>
  <Card title="移动应用" icon="mobile" href="/cn/development/mobile-app">
    随时查看构建状态和分析数据，并接收推送通知
  </Card>
</Columns>