feat: docs workflow
This commit is contained in:
@@ -32,21 +32,24 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # 如果未启用 lastUpdated,则不需要
|
fetch-depth: 0 # 如果未启用 lastUpdated,则不需要
|
||||||
# - uses: pnpm/action-setup@v3 # 如果使用 pnpm,请取消此区域注释
|
- uses: pnpm/action-setup@v3
|
||||||
# with:
|
with:
|
||||||
# version: 9
|
version: 9
|
||||||
# - uses: oven-sh/setup-bun@v1 # 如果使用 Bun,请取消注释
|
# - uses: oven-sh/setup-bun@v1 # 如果使用 Bun,请取消注释
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: pnpm # 或 pnpm / yarn
|
cache: 'pnpm'
|
||||||
|
cache-dependency-path: 'docs/pnpm-lock.yaml'
|
||||||
- name: Setup Pages
|
- name: Setup Pages
|
||||||
uses: actions/configure-pages@v4
|
uses: actions/configure-pages@v4
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install # 或 pnpm install / yarn install / bun install
|
working-directory: docs
|
||||||
|
run: pnpm install
|
||||||
- name: Build with VitePress
|
- 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
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v3
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import {defineConfig} from 'vitepress'
|
|||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
title: 'FileCodeBox',
|
title: 'FileCodeBox',
|
||||||
description: '简单高效的文件分享工具',
|
description: '简单高效的文件分享工具',
|
||||||
|
base: '/FileCodeBox/',
|
||||||
lang: 'zh-CN',
|
lang: 'zh-CN',
|
||||||
lastUpdated: true,
|
lastUpdated: true,
|
||||||
locales: {
|
locales: {
|
||||||
@@ -72,7 +73,7 @@ export default defineConfig({
|
|||||||
{ icon: 'github', link: 'https://github.com/vastsa/FileCodeBox' },
|
{ icon: 'github', link: 'https://github.com/vastsa/FileCodeBox' },
|
||||||
],
|
],
|
||||||
footer: {
|
footer: {
|
||||||
message: '基于 LGPL 许可发布',
|
message: '基于 MIT 许可发布',
|
||||||
copyright: 'Copyright © 2023-present FileCodeBox',
|
copyright: 'Copyright © 2023-present FileCodeBox',
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
@@ -103,6 +104,7 @@ export default defineConfig({
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
sidebar: {
|
sidebar: {
|
||||||
'/en/guide/': [
|
'/en/guide/': [
|
||||||
{
|
{
|
||||||
@@ -154,7 +156,7 @@ export default defineConfig({
|
|||||||
{ icon: 'github', link: 'https://github.com/vastsa/FileCodeBox' },
|
{ icon: 'github', link: 'https://github.com/vastsa/FileCodeBox' },
|
||||||
],
|
],
|
||||||
footer: {
|
footer: {
|
||||||
message: '基于 MIT 许可发布',
|
message: 'Released under the MIT License',
|
||||||
copyright: 'Copyright © 2023-present FileCodeBox',
|
copyright: 'Copyright © 2023-present FileCodeBox',
|
||||||
},
|
},
|
||||||
search: {
|
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',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user