Skip to content

Commit 6506c07

Browse files
committed
chore: standardize repository config
1 parent c4c0802 commit 6506c07

13 files changed

Lines changed: 232 additions & 134 deletions

.dumirc.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { defineConfig } from 'dumi';
22
import path from 'path';
33

4+
const basePath = process.env.GH_PAGES ? '/rate/' : '/';
5+
const publicPath = process.env.GH_PAGES ? '/rate/' : '/';
6+
47
export default defineConfig({
58
alias: {
69
'@rc-component/rate$': path.resolve('src'),
@@ -11,4 +14,7 @@ export default defineConfig({
1114
name: 'Rate',
1215
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
1316
},
17+
outputPath: 'docs-dist',
18+
base: basePath,
19+
publicPath,
1420
});

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: ant-design
2+
open_collective: ant-design

.github/dependabot.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
version: 2
22
updates:
3-
- package-ecosystem: npm
4-
directory: "/"
5-
schedule:
6-
interval: daily
7-
time: "21:00"
8-
open-pull-requests-limit: 10
9-
ignore:
10-
- dependency-name: "@types/react"
11-
versions:
12-
- 17.0.0
13-
- 17.0.1
14-
- 17.0.2
15-
- 17.0.3
16-
- dependency-name: "@types/react-dom"
17-
versions:
18-
- 17.0.0
19-
- 17.0.1
20-
- 17.0.2
3+
- package-ecosystem: npm
4+
directory: '/'
5+
schedule:
6+
interval: daily
7+
time: '21:00'
8+
open-pull-requests-limit: 10
9+
ignore:
10+
- dependency-name: '@types/react'
11+
versions:
12+
- 17.0.0
13+
- 17.0.1
14+
- 17.0.2
15+
- 17.0.3
16+
- dependency-name: '@types/react-dom'
17+
versions:
18+
- 17.0.0
19+
- 17.0.1
20+
- 17.0.2

.github/workflows/codeql.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: "CodeQL"
1+
name: 'CodeQL'
22

33
on:
44
push:
5-
branches: [ "master" ]
5+
branches: ['master']
66
pull_request:
7-
branches: [ "master" ]
7+
branches: ['master']
88
schedule:
9-
- cron: "7 4 * * 2"
9+
- cron: '7 4 * * 2'
1010

1111
jobs:
1212
analyze:
@@ -20,22 +20,24 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
language: [ javascript ]
23+
language: [javascript]
2424

2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@v3
27+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
28+
with:
29+
persist-credentials: false
2830

2931
- name: Initialize CodeQL
30-
uses: github/codeql-action/init@v2
32+
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
3133
with:
3234
languages: ${{ matrix.language }}
3335
queries: +security-and-quality
3436

3537
- name: Autobuild
36-
uses: github/codeql-action/autobuild@v2
38+
uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
3739

3840
- name: Perform CodeQL Analysis
39-
uses: github/codeql-action/analyze@v2
41+
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
4042
with:
41-
category: "/language:${{ matrix.language }}"
43+
category: '/language:${{ matrix.language }}'
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: ✅ test
22
on: [push, pull_request]
3+
permissions:
4+
contents: read
35
jobs:
46
test:
5-
uses: react-component/rc-test/.github/workflows/test.yml@main
6-
secrets: inherit
7+
uses: react-component/rc-test/.github/workflows/test-utoo.yml@main
8+
secrets: inherit

.github/workflows/react-doctor.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: React Doctor
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
push:
7+
branches: [master]
8+
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
issues: write
13+
statuses: write
14+
15+
concurrency:
16+
group: react-doctor-${{ github.event.pull_request.number || github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
react-doctor:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
24+
with:
25+
fetch-depth: 0
26+
persist-credentials: false
27+
- uses: millionco/react-doctor@0b4f4f4bd248a154e64eb508a48347f71154b3f3
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Surge Preview
2+
3+
on:
4+
pull_request:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
8+
cancel-in-progress: true
9+
10+
permissions:
11+
contents: read
12+
pull-requests: write
13+
checks: write
14+
statuses: write
15+
16+
jobs:
17+
preview:
18+
runs-on: ubuntu-latest
19+
env:
20+
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
21+
PREVIEW: true
22+
steps:
23+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
24+
with:
25+
persist-credentials: false
26+
- uses: afc163/surge-preview@bf90a5a86111f6311ca42f0a5a0f80fb0fb03cec
27+
if: ${{ env.SURGE_TOKEN != '' }}
28+
with:
29+
surge_token: ${{ env.SURGE_TOKEN }}
30+
github_token: ${{ secrets.GITHUB_TOKEN }}
31+
dist: docs-dist
32+
failOnError: true
33+
setCommitStatus: true
34+
build: |
35+
npm install
36+
npm run build
37+
- name: Skip Surge preview
38+
if: ${{ env.SURGE_TOKEN == '' }}
39+
run: echo "SURGE_TOKEN is not configured; skip Surge preview."

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@ package-lock.json
2929
pnpm-lock.yaml
3030
.doc/
3131
dist
32+
docs-dist
3233
.doc
3334
# dumi
3435
.dumi/tmp
3536
.dumi/tmp-test
3637
.dumi/tmp-production
38+
.vercel
3739

3840
bun.lockb

0 commit comments

Comments
 (0)