Skip to content

Commit

Permalink
docs(refactor): organize the pkgs and fix some issues (#702)
Browse files Browse the repository at this point in the history
* docs: rebuild docs

* chore: fix eslint

* ci: add docs build test

* update test-docs.yml

* fix script

* add netlify.toml

* fix docs:patch

---------

Co-authored-by: qwqcode <[email protected]>
  • Loading branch information
Mister-Hope and qwqcode authored Dec 19, 2023
1 parent 7a0a9db commit 91228a9
Show file tree
Hide file tree
Showing 123 changed files with 7,822 additions and 9,744 deletions.
74 changes: 28 additions & 46 deletions .github/workflows/docs-cn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,50 +13,32 @@ jobs:

runs-on: ubuntu-latest

defaults:
run:
# set for building docs
working-directory: ./docs

steps:
# - name: Wait for other docs build to succeed
# uses: lewagon/[email protected]
# with:
# running-workflow-name: 'Docs CN Mirror Deploy'
# check-name: 'Build Docs'
# ref: ${{ github.ref }}
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# allowed-conclusions: success,skipped,cancelled
# wait-interval: 10

- name: Checkout
uses: actions/checkout@v3

- name: Use pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Build Docs
run: pnpm docs:build

- name: Deploy
uses: TencentCloud/cos-action@v1
with:
secret_id: ${{ secrets.TENCENT_CLOUD_SECRET_ID }}
secret_key: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }}
cos_bucket: ${{ secrets.DOCS_CN_COS_BUCKET }}
cos_region: ${{ secrets.DOCS_CN_COS_REGION }}
local_path: .vitepress/dist/
remote_path: /
clean: true
- name: Checkout
uses: actions/checkout@v3

- name: Use pnpm
uses: pnpm/action-setup@v2

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Build Docs
run: pnpm docs:build

- name: Deploy
uses: TencentCloud/cos-action@v1
with:
secret_id: ${{ secrets.TENCENT_CLOUD_SECRET_ID }}
secret_key: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }}
cos_bucket: ${{ secrets.DOCS_CN_COS_BUCKET }}
cos_region: ${{ secrets.DOCS_CN_COS_REGION }}
local_path: .vitepress/dist/
remote_path: /
clean: true
32 changes: 32 additions & 0 deletions .github/workflows/test-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test Docs

on:
pull_request:
paths:
- "docs/**"
push:
paths:
- "docs/**"

jobs:
test_docs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use pnpm
uses: pnpm/action-setup@v2

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Build Docs
run: pnpm docs:build
3 changes: 0 additions & 3 deletions docs/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions docs/.npmrc

This file was deleted.

211 changes: 0 additions & 211 deletions docs/.vitepress/config.ts

This file was deleted.

2 changes: 2 additions & 0 deletions docs/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vitepress/dist/**
.vitepress/cache/**
Loading

0 comments on commit 91228a9

Please sign in to comment.