ci: 添加文档构建和部署的GitHub工作流

添加GitHub Actions工作流用于自动构建和部署文档,同时更新文档配置中的基础链接
This commit is contained in:
anghunk
2026-01-21 14:48:43 +08:00
parent c1a436e220
commit 899c2068da
2 changed files with 18 additions and 0 deletions

17
.github/workflows/docs.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: Build and Deploy
on: [push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: vuepress-deploy
uses: jenkey2011/vuepress-deploy@master
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
TARGET_REPO: anghunk/CWD
TARGET_BRANCH: gh-pages
BUILD_SCRIPT: cd docs && npm install && npm run build
BUILD_DIR: docs/.vitepress/dist/

View File

@@ -6,6 +6,7 @@ export default defineConfig({
title: 'CWD 评论系统文档',
description: '基于 Cloudflare Workers 的轻量级评论系统',
lang: 'zh-CN',
link: '/',
head: [
[
'link',