Skip to content

Commit 5c92677

Browse files
committed
chore: standardize repository tooling
1 parent e98fa3b commit 5c92677

6 files changed

Lines changed: 220 additions & 293 deletions

File tree

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ name: ✅ test
22
on: [push, pull_request]
33
jobs:
44
test:
5-
uses: react-component/rc-test/.github/workflows/test-npm.yml@main
6-
secrets: inherit
5+
uses: react-component/rc-test/.github/workflows/test-utoo.yml@main
6+
secrets: inherit

.github/workflows/react-doctor.yml

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

0 commit comments

Comments
 (0)