feat: docs workflow

This commit is contained in:
Lan
2025-02-12 14:51:08 +08:00
parent 93b005bf5a
commit 2d3dcad3ad
2 changed files with 232 additions and 211 deletions
+9 -6
View File
@@ -32,21 +32,24 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0 # 如果未启用 lastUpdated,则不需要
# - uses: pnpm/action-setup@v3 # 如果使用 pnpm,请取消此区域注释
# with:
# version: 9
- uses: pnpm/action-setup@v3
with:
version: 9
# - uses: oven-sh/setup-bun@v1 # 如果使用 Bun,请取消注释
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm # 或 pnpm / yarn
cache: 'pnpm'
cache-dependency-path: 'docs/pnpm-lock.yaml'
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: pnpm install # 或 pnpm install / yarn install / bun install
working-directory: docs
run: pnpm install
- name: Build with VitePress
run: pnpm run docs:build # 或 pnpm docs:build / yarn docs:build / bun run docs:build
working-directory: docs
run: pnpm run docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
+20 -2
View File
@@ -4,6 +4,7 @@ import {defineConfig} from 'vitepress'
export default defineConfig({
title: 'FileCodeBox',
description: '简单高效的文件分享工具',
base: '/FileCodeBox/',
lang: 'zh-CN',
lastUpdated: true,
locales: {
@@ -72,7 +73,7 @@ export default defineConfig({
{ icon: 'github', link: 'https://github.com/vastsa/FileCodeBox' },
],
footer: {
message: '基于 LGPL 许可发布',
message: '基于 MIT 许可发布',
copyright: 'Copyright © 2023-present FileCodeBox',
},
search: {
@@ -103,6 +104,7 @@ export default defineConfig({
],
},
],
sidebar: {
'/en/guide/': [
{
@@ -154,7 +156,7 @@ export default defineConfig({
{ icon: 'github', link: 'https://github.com/vastsa/FileCodeBox' },
],
footer: {
message: '基于 MIT 许可发布',
message: 'Released under the MIT License',
copyright: 'Copyright © 2023-present FileCodeBox',
},
search: {
@@ -204,6 +206,22 @@ export default defineConfig({
},
},
},
en: {
translations: {
button: {
buttonText: 'Search',
buttonAriaLabel: 'Search docs',
},
modal: {
noResultsText: 'No results found',
resetButtonTitle: 'Clear query',
footer: {
selectText: 'to select',
navigateText: 'to navigate',
},
},
},
},
},
},
},