Skip to content
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
28 changes: 28 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: 2
updates:
# Enable version updates for npm
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
open-pull-requests-limit: 10
labels:
- "dependencies"
- "automated"
commit-message:
prefix: "chore"
prefix-development: "chore"
include: "scope"

# Enable version updates for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
labels:
- "dependencies"
- "github-actions"
commit-message:
prefix: "ci"
include: "scope"
38 changes: 38 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
documentation:
- changed-files:
- any-glob-to-any-file:
- 'content/**/*.mdx'
- '*.md'

i18n:
- changed-files:
- any-glob-to-any-file:
- 'content/**/*.zh-CN.mdx'
- 'content/**/*.en.mdx'
- 'lib/i18n.ts'

ui:
- changed-files:
- any-glob-to-any-file:
- 'app/**/*.tsx'
- 'app/**/*.ts'
- '*.tsx'

Comment on lines +19 to +20
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pattern '.tsx' only matches TypeScript files in the root directory. If the intent is to match all TSX files, use '**/.tsx'. However, since 'app/**/*.tsx' is already specified, this pattern seems redundant unless there are TSX files expected in the root.

Suggested change
- '*.tsx'

Copilot uses AI. Check for mistakes.
configuration:
- changed-files:
- any-glob-to-any-file:
- '*.config.*'
- 'tsconfig.json'
- 'vercel.json'

dependencies:
- changed-files:
- any-glob-to-any-file:
- 'package.json'
- 'package-lock.json'
- 'pnpm-lock.yaml'

workflows:
- changed-files:
- any-glob-to-any-file:
- '.github/**'
17 changes: 17 additions & 0 deletions .github/markdown-link-check-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"ignorePatterns": [
{
"pattern": "^http://localhost"
},
{
"pattern": "^https://localhost"
}
],
"replacements": [],
"httpHeaders": [],
"timeout": "20s",
"retryOn429": true,
"retryCount": 3,
"fallbackRetryDelay": "30s",
"aliveStatusCodes": [200, 206, 301, 302, 307, 308]
}
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Generate source files
run: npx fumadocs-mdx

- name: Type check
run: npx tsc --noEmit

- name: Build
run: npm run build
env:
NODE_ENV: production

- name: Upload build artifacts
uses: actions/upload-artifact@v4
if: success()
with:
name: build-output
path: .next
retention-days: 7
23 changes: 23 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: PR Labeler

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
label:
name: Auto Label PR
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Label based on changed files
uses: actions/labeler@v5.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/labeler.yml
41 changes: 41 additions & 0 deletions .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Link Check

on:
pull_request:
paths:
- 'content/**'
- '**.md'
- '**.mdx'
schedule:
# Run weekly on Monday at 00:00 UTC
- cron: '0 0 * * 1'
workflow_dispatch:

jobs:
link-check:
name: Check Links
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Check links in content directory
uses: gaurav-nelson/github-action-markdown-link-check@v1.0.15
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'no'
config-file: '.github/markdown-link-check-config.json'
folder-path: 'content/'
check-modified-files-only: ${{ github.event_name == 'pull_request' && 'yes' || 'no' }}

- name: Check links in root markdown files
uses: gaurav-nelson/github-action-markdown-link-check@v1.0.15
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'no'
config-file: '.github/markdown-link-check-config.json'
file-path: './README.md'
check-modified-files-only: ${{ github.event_name == 'pull_request' && 'yes' || 'no' }}
Comment on lines +28 to +41
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link check workflow uses 'yes'/'no' string values. While this works with the action, using boolean values (true/false) without quotes would be more idiomatic for GitHub Actions workflows and clearer in intent.

Suggested change
use-quiet-mode: 'yes'
use-verbose-mode: 'no'
config-file: '.github/markdown-link-check-config.json'
folder-path: 'content/'
check-modified-files-only: ${{ github.event_name == 'pull_request' && 'yes' || 'no' }}
- name: Check links in root markdown files
uses: gaurav-nelson/github-action-markdown-link-check@v1.0.15
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'no'
config-file: '.github/markdown-link-check-config.json'
file-path: './README.md'
check-modified-files-only: ${{ github.event_name == 'pull_request' && 'yes' || 'no' }}
use-quiet-mode: true
use-verbose-mode: false
config-file: '.github/markdown-link-check-config.json'
folder-path: 'content/'
check-modified-files-only: ${{ github.event_name == 'pull_request' }}
- name: Check links in root markdown files
uses: gaurav-nelson/github-action-markdown-link-check@v1.0.15
with:
use-quiet-mode: true
use-verbose-mode: false
config-file: '.github/markdown-link-check-config.json'
file-path: './README.md'
check-modified-files-only: ${{ github.event_name == 'pull_request' }}

Copilot uses AI. Check for mistakes.
44 changes: 44 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Preview Deployment

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
preview-info:
name: Preview Information
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- name: Checkout code
uses: actions/checkout@v4

Comment on lines +16 to +18
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checkout step is unnecessary in this workflow since the script doesn't interact with repository files. Removing this step would make the workflow faster and more efficient.

Suggested change
- name: Checkout code
uses: actions/checkout@v4

Copilot uses AI. Check for mistakes.
- name: Comment PR with deployment info
uses: actions/github-script@v7
with:
script: |
const prNumber = context.issue.number;

const comment = `## 🚀 Preview Deployment

This pull request will be automatically deployed to Vercel.

### Preview Links
- 📝 **Documentation**: Will be available once Vercel deployment completes
- 🌍 **Languages**: English (\`/en/docs\`) and Chinese (\`/zh-CN/docs\`)

### Build Status
Check the CI workflow for build status and any errors.

---
*Automated preview information for PR #${prNumber}*`;

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});
Comment on lines +39 to +44
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The preview workflow will create a new comment on every PR update (synchronize event). This could lead to comment spam on PRs with multiple commits. Consider checking for existing comments and updating them instead, or use a bot identifier and delete previous comments before creating a new one.

Copilot uses AI. Check for mistakes.
Loading