Skip to content

Commit 0edc4f9

Browse files
committed
chore: standardize repository tooling
1 parent 08a9beb commit 0edc4f9

6 files changed

Lines changed: 231 additions & 130 deletions

File tree

.github/workflows/react-doctor.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: React Doctor
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
issues: write
12+
statuses: write
13+
14+
jobs:
15+
react-doctor:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v5
19+
with:
20+
fetch-depth: 0
21+
- 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)