Skip to content

Commit

Permalink
重新安装主题并更新部分文档
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenxuan Chen committed Feb 3, 2024
1 parent 982c5c5 commit a6aa684
Show file tree
Hide file tree
Showing 48 changed files with 5,406 additions and 1 deletion.
52 changes: 52 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: 部署文档

on:
push:
branches:
# 确保这是你正在使用的分支名称
- main

permissions:
contents: write

jobs:
deploy-gh-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# 如果你文档需要 Git 子模块,取消注释下一行
# submodules: true

- name: 降级 Yarn 以确保可以成功更新 Yarn
run:
npm install -g yarn@1.22.19

- name: 更新 Yarn
run:
yarn set version berry

- name: 设置 Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: yarn

- name: 安装依赖
run: yarn install --frozen-lockfile

- name: 构建文档
env:
NODE_OPTIONS: --max_old_space_size=8192
run: |-
yarn run docs:build
> docs/.vuepress/dist/.nojekyll
- name: 部署文档
uses: JamesIves/github-pages-deploy-action@v4
with:
# 这是文档部署到的分支名称
branch: gh-pages
folder: docs/.vuepress/dist
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@

#!.yarn/cache
.pnp.*

# nodeLinker
node_modules/

node_modules/
docs/.vuepress/.cache/
docs/.vuepress/.temp/
docs/.vuepress/dist/
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: 'node-modules'
15 changes: 15 additions & 0 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { defineUserConfig } from "vuepress";
import theme from "./theme.js";

export default defineUserConfig({
base: "/",

lang: "zh-CN",
title: "网站使用文档",
description: "初一三班网站使用文档",

theme,

// 和 PWA 一起启用
// shouldPrefetch: false,
});
30 changes: 30 additions & 0 deletions docs/.vuepress/navbar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { navbar } from "vuepress-theme-hope";

export default navbar([
"/",
"/demo/",
{
text: "指南",
icon: "lightbulb",
prefix: "/guide/",
children: [
{
text: "Bar",
icon: "lightbulb",
prefix: "bar/",
children: ["baz", { text: "...", icon: "ellipsis", link: "" }],
},
{
text: "Foo",
icon: "lightbulb",
prefix: "foo/",
children: ["ray", { text: "...", icon: "ellipsis", link: "" }],
},
],
},
{
text: "V2 文档",
icon: "book",
link: "https://theme-hope.vuejs.press/zh/",
},
]);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vuepress/public/assets/icon/chrome-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vuepress/public/assets/icon/chrome-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vuepress/public/assets/icon/ms-icon-144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/.vuepress/public/assets/image/advanced.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/.vuepress/public/assets/image/blog.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/.vuepress/public/assets/image/box.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/.vuepress/public/assets/image/features.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/.vuepress/public/assets/image/github-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/.vuepress/public/assets/image/github-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a6aa684

Please sign in to comment.