Skip to content

Commit 28adb04

Browse files
committed
docs(website): 更新GitHub链接
1 parent 3e05ddb commit 28adb04

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
name: Deploy Official Site
22

3-
# 触发条件:1.master分支推送且改动指定文件 2.手动触发(新增核心)
43
on:
54
push:
65
branches:
76
- master
87
paths:
98
- 'package/official-site/**'
109
- '.github/workflows/deploy-docs.yml'
11-
workflow_dispatch: # ✅ 新增:开启手动触发,测试/重部署超方便
10+
workflow_dispatch:
1211

13-
# 权限配置:赋予写入仓库内容的权限(自包含,无需仓库额外配置)
1412
permissions:
1513
contents: write
1614

@@ -20,33 +18,29 @@ jobs:
2018
steps:
2119
- uses: actions/checkout@v4
2220
with:
23-
fetch-depth: 0 # ✅ 你的配置完全正确:拉取全提交记录,解决VitePress git信息缺失
21+
fetch-depth: 0
2422

2523
- name: Setup Node.js 20
2624
uses: actions/setup-node@v4
2725
with:
2826
node-version: 20
2927
cache: 'npm'
30-
# ✅ 你的配置完全正确:指定子目录的lock文件,精准缓存依赖
3128
cache-dependency-path: 'package/official-site/package-lock.json'
3229

33-
# ✅ 优化:用working-directory替代cd,配置更整洁
3430
- name: Install Dependencies
3531
working-directory: ./package/official-site
3632
run: npm install
3733

38-
# ✅ 优化:用working-directory替代cd,搭配日志分组
3934
- name: Build VitePress Site
4035
working-directory: ./package/official-site
4136
run: |
4237
echo "::group::开始构建文档站点"
4338
npm run docs:build
4439
echo "::endgroup::"
4540
46-
# ✅ 修复核心:升级为v4稳定版
4741
- name: Deploy to GitHub Pages
4842
uses: peaceiris/actions-gh-pages@v4
4943
with:
5044
github_token: ${{ secrets.GITHUB_TOKEN }}
51-
# ✅ 你的配置完全正确:VitePress打包产物目录,无需修改
52-
publish_dir: ./package/official-site/.vitepress/dist
45+
publish_dir: ./package/official-site/.vitepress/dist
46+
force_orphan: true

package/official-site/.vitepress/config.mts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { defineConfig } from 'vitepress'
22

33
export default defineConfig({
4-
base: '/TrailSnap/',
4+
base: '/TrailSnap/',
55
title: "TrailSnap 行影集",
66
description: "AI 驱动的智能相册与旅行足迹记录工具",
77
themeConfig: {
@@ -35,12 +35,12 @@ export default defineConfig({
3535
},
3636

3737
socialLinks: [
38-
{ icon: 'github', link: 'https://github.com/your-repo/trailsnap' }
38+
{ icon: 'github', link: 'https://github.com/LC044/TrailSnap' }
3939
],
4040

4141
footer: {
42-
message: '基于 MIT 许可发布',
43-
copyright: '版权所有 © 2024-至今 TrailSnap 贡献者'
42+
message: '基于 AGPL-3.0 许可发布',
43+
copyright: '版权所有 © 2025-至今 TrailSnap'
4444
}
4545
}
4646
})

package/official-site/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ hero:
1111
link: /docs/guide/user
1212
- theme: alt
1313
text: "GitHub 源码"
14-
link: https://github.com/your-repo/trailsnap
14+
link: https://github.com/LC044/TrailSnap
1515

1616
features:
1717
- title: AI 智能识别

0 commit comments

Comments
 (0)