Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rebuild docs #702

Merged
merged 8 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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