Skip to content

Commit c3368c7

Browse files
authored
Merge pull request #6 from objectstack-ai/copilot/create-required-automation-workflows
2 parents ff601d7 + 9c33ed2 commit c3368c7

File tree

7 files changed

+239
-0
lines changed

7 files changed

+239
-0
lines changed

.github/dependabot.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for npm
4+
- package-ecosystem: "npm"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
open-pull-requests-limit: 10
10+
labels:
11+
- "dependencies"
12+
- "automated"
13+
commit-message:
14+
prefix: "chore"
15+
prefix-development: "chore"
16+
include: "scope"
17+
18+
# Enable version updates for GitHub Actions
19+
- package-ecosystem: "github-actions"
20+
directory: "/"
21+
schedule:
22+
interval: "monthly"
23+
labels:
24+
- "dependencies"
25+
- "github-actions"
26+
commit-message:
27+
prefix: "ci"
28+
include: "scope"

.github/labeler.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
documentation:
2+
- changed-files:
3+
- any-glob-to-any-file:
4+
- 'content/**/*.mdx'
5+
- '*.md'
6+
7+
i18n:
8+
- changed-files:
9+
- any-glob-to-any-file:
10+
- 'content/**/*.zh-CN.mdx'
11+
- 'content/**/*.en.mdx'
12+
- 'lib/i18n.ts'
13+
14+
ui:
15+
- changed-files:
16+
- any-glob-to-any-file:
17+
- 'app/**/*.tsx'
18+
- 'app/**/*.ts'
19+
- '*.tsx'
20+
21+
configuration:
22+
- changed-files:
23+
- any-glob-to-any-file:
24+
- '*.config.*'
25+
- 'tsconfig.json'
26+
- 'vercel.json'
27+
28+
dependencies:
29+
- changed-files:
30+
- any-glob-to-any-file:
31+
- 'package.json'
32+
- 'package-lock.json'
33+
- 'pnpm-lock.yaml'
34+
35+
workflows:
36+
- changed-files:
37+
- any-glob-to-any-file:
38+
- '.github/**'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"ignorePatterns": [
3+
{
4+
"pattern": "^http://localhost"
5+
},
6+
{
7+
"pattern": "^https://localhost"
8+
}
9+
],
10+
"replacements": [],
11+
"httpHeaders": [],
12+
"timeout": "20s",
13+
"retryOn429": true,
14+
"retryCount": 3,
15+
"fallbackRetryDelay": "30s",
16+
"aliveStatusCodes": [200, 206, 301, 302, 307, 308]
17+
}

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
name: Build and Test
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '20'
26+
cache: 'npm'
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Generate source files
32+
run: npx fumadocs-mdx
33+
34+
- name: Type check
35+
run: npx tsc --noEmit
36+
37+
- name: Build
38+
run: npm run build
39+
env:
40+
NODE_ENV: production
41+
42+
- name: Upload build artifacts
43+
uses: actions/upload-artifact@v4
44+
if: success()
45+
with:
46+
name: build-output
47+
path: .next
48+
retention-days: 7

.github/workflows/label.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: PR Labeler
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
label:
9+
name: Auto Label PR
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Label based on changed files
20+
uses: actions/[email protected]
21+
with:
22+
repo-token: ${{ secrets.GITHUB_TOKEN }}
23+
configuration-path: .github/labeler.yml

.github/workflows/link-check.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Link Check
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'content/**'
7+
- '**.md'
8+
- '**.mdx'
9+
schedule:
10+
# Run weekly on Monday at 00:00 UTC
11+
- cron: '0 0 * * 1'
12+
workflow_dispatch:
13+
14+
jobs:
15+
link-check:
16+
name: Check Links
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Check links in content directory
26+
uses: gaurav-nelson/[email protected]
27+
with:
28+
use-quiet-mode: 'yes'
29+
use-verbose-mode: 'no'
30+
config-file: '.github/markdown-link-check-config.json'
31+
folder-path: 'content/'
32+
check-modified-files-only: ${{ github.event_name == 'pull_request' && 'yes' || 'no' }}
33+
34+
- name: Check links in root markdown files
35+
uses: gaurav-nelson/[email protected]
36+
with:
37+
use-quiet-mode: 'yes'
38+
use-verbose-mode: 'no'
39+
config-file: '.github/markdown-link-check-config.json'
40+
file-path: './README.md'
41+
check-modified-files-only: ${{ github.event_name == 'pull_request' && 'yes' || 'no' }}

.github/workflows/preview.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Preview Deployment
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
preview-info:
9+
name: Preview Information
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Comment PR with deployment info
20+
uses: actions/github-script@v7
21+
with:
22+
script: |
23+
const prNumber = context.issue.number;
24+
25+
const comment = `## 🚀 Preview Deployment
26+
27+
This pull request will be automatically deployed to Vercel.
28+
29+
### Preview Links
30+
- 📝 **Documentation**: Will be available once Vercel deployment completes
31+
- 🌍 **Languages**: English (\`/en/docs\`) and Chinese (\`/zh-CN/docs\`)
32+
33+
### Build Status
34+
Check the CI workflow for build status and any errors.
35+
36+
---
37+
*Automated preview information for PR #${prNumber}*`;
38+
39+
github.rest.issues.createComment({
40+
issue_number: context.issue.number,
41+
owner: context.repo.owner,
42+
repo: context.repo.repo,
43+
body: comment
44+
});

0 commit comments

Comments
 (0)