From 899c2068da5450bb5f8e1c25aa9d202cfe31e736 Mon Sep 17 00:00:00 2001 From: anghunk Date: Wed, 21 Jan 2026 14:48:43 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=B7=BB=E5=8A=A0=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E5=92=8C=E9=83=A8=E7=BD=B2=E7=9A=84GitHub?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加GitHub Actions工作流用于自动构建和部署文档,同时更新文档配置中的基础链接 --- .github/workflows/docs.yml | 17 +++++++++++++++++ docs/.vitepress/config.mjs | 1 + 2 files changed, 18 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..6670bc7 --- /dev/null +++ b/.github/workflows/docs.yml @@ -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/ diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index d121921..5251a82 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -6,6 +6,7 @@ export default defineConfig({ title: 'CWD 评论系统文档', description: '基于 Cloudflare Workers 的轻量级评论系统', lang: 'zh-CN', + link: '/', head: [ [ 'link',