Skip to content

Commit 4b4cfcd

Browse files
committed
build: migrate docs into a separate repo
0 parents  commit 4b4cfcd

File tree

164 files changed

+27902
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+27902
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
!.vuepress/
2+
!.*.js
3+
.cache/
4+
.temp/
5+
node_modules/
6+
dist/

.eslintrc.cjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
root: true,
3+
extends: 'vuepress',
4+
overrides: [
5+
{
6+
files: ['*.ts', '*.vue'],
7+
extends: 'vuepress-typescript',
8+
parserOptions: {
9+
project: ['tsconfig.json'],
10+
},
11+
},
12+
],
13+
}

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
* text eol=lf
2+
*.txt text eol=crlf
3+
4+
*.png binary
5+
*.jpg binary
6+
*.jpeg binary
7+
*.ico binary
8+
*.tff binary
9+
*.woff binary
10+
*.woff2 binary

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Bug Report
2+
description: Create a report to help us improve
3+
title: '[Bug report] '
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to fill out this bug report!
9+
- type: textarea
10+
id: bug-description
11+
attributes:
12+
label: Description
13+
description: A clear and concise description of what the bug is. If applicable, add screenshots to help explain your problem. If you intend to submit a PR for this issue, tell us in the description. Thanks!
14+
placeholder: Bug description
15+
validations:
16+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Question & Discussion
4+
url: https://github.com/vuepress/docs/discussions
5+
about: Please ask and answer questions here.

.github/workflows/check-docs.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: check-docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
check-docs:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [ubuntu-latest, windows-latest, macos-latest]
18+
node: ['18', '20']
19+
bundler: ['vite', 'webpack']
20+
21+
runs-on: ${{ matrix.os }}
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Install pnpm
27+
uses: pnpm/action-setup@v2
28+
29+
- name: Use Node.js ${{ matrix.node }}
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: ${{ matrix.node }}
33+
cache: pnpm
34+
35+
- name: Install dependencies
36+
run: pnpm install --frozen-lockfile
37+
38+
- name: Build source code
39+
run: pnpm build
40+
41+
- name: Build docs with ${{ matrix.bundler }}
42+
run: pnpm docs:build
43+
env:
44+
DOCS_BUNDLER: ${{ matrix.bundler }}
45+
46+
check-docs-result:
47+
if: ${{ always() }}
48+
name: check-docs result
49+
runs-on: ubuntu-latest
50+
needs: [check-docs]
51+
steps:
52+
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
53+
run: exit 1

.github/workflows/docs.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
docs:
11+
runs-on: ubuntu-latest
12+
13+
env:
14+
DOCS_GA_ID: G-CTB8FQ7VMW
15+
NODE_VERSION: '18'
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Install pnpm
23+
uses: pnpm/action-setup@v2
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ env.NODE_VERSION }}
29+
cache: pnpm
30+
31+
- name: Install dependencies
32+
run: pnpm install --frozen-lockfile
33+
34+
- name: Build documentation site
35+
run: pnpm docs:build
36+
37+
- name: Deploy to GitHub Pages
38+
uses: crazy-max/ghaction-github-pages@v4
39+
with:
40+
repo: vuepress/vuepress.github.io
41+
target_branch: main
42+
build_dir: docs/.vuepress/dist
43+
env:
44+
GH_PAT: ${{ secrets.GH_PAGES_TOKEN }}

.github/workflows/issue-commented.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: issue-commented
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
issue-commented:
9+
name: remove stale on commented
10+
if: contains(github.event.issue.labels.*.name, 'stale')
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions-cool/issues-helper@v3
14+
with:
15+
actions: 'remove-labels'
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
labels: 'stale'

.github/workflows/issue-daily.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: issue-daily
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
jobs:
8+
issue-label-stale:
9+
name: label stale issues
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions-cool/issues-helper@v3
13+
with:
14+
actions: 'check-inactive'
15+
token: ${{ secrets.GITHUB_TOKEN }}
16+
inactive-day: 15
17+
inactive-label: 'stale'
18+
exclude-labels: 'bug, documentation, enhancement, feature, help wanted, need reproduction, need review, stale'
19+
body: |
20+
This issue is marked as `stale` because it has not had recent activity. Issues marked with `stale` will be closed if they have no activity within 7 days.
21+
22+
issue-close-stale:
23+
name: close stale issues
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions-cool/issues-helper@v3
27+
with:
28+
actions: 'close-issues'
29+
token: ${{ secrets.GITHUB_TOKEN }}
30+
labels: 'stale'
31+
inactive-day: 7
32+
33+
issue-close-need-reproduction:
34+
name: close need-reproduction issues
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions-cool/issues-helper@v3
38+
with:
39+
actions: 'close-issues'
40+
token: ${{ secrets.GITHUB_TOKEN }}
41+
labels: 'need reproduction'
42+
inactive-day: 7

0 commit comments

Comments
 (0)