-
Notifications
You must be signed in to change notification settings - Fork 0
[WIP] Create necessary automation workflows #6
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
Changes from all commits
6af8d04
22aaffb
7e59104
5d2acac
93eea7a
c776949
f134230
907ec82
0a4d9f3
9c33ed2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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" |
| 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' | ||
|
|
||
| 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/**' | ||
| 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] | ||
| } |
| 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 |
| 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 |
| 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
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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' }} |
| 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
|
||||||||
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.