Skip to content

Commit 774e6ed

Browse files
committed
chore: add diff action (#2705)
1 parent 4aa9012 commit 774e6ed

File tree

4 files changed

+523
-1
lines changed

4 files changed

+523
-1
lines changed

.github/workflows/diff.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Diff
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, closed]
6+
7+
jobs:
8+
Build:
9+
runs-on: ubuntu-latest
10+
11+
permissions:
12+
contents: write
13+
issues: write
14+
pull-requests: write
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
19+
with:
20+
fetch-depth: 0
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- name: Setup Pnpm
24+
run: |
25+
npm install -g corepack@latest --force
26+
corepack enable
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
30+
with:
31+
node-version: 22
32+
cache: 'pnpm'
33+
34+
- name: Install Dependencies and Build
35+
run: |
36+
pnpm install
37+
38+
- name: Build Demo Project
39+
run: |
40+
cd website
41+
pnpm install
42+
RSDOCTOR=1 pnpm run build
43+
44+
- name: Report Compressed Size
45+
uses: web-infra-dev/rsdoctor-action@feat/no-baseline-report
46+
with:
47+
github_token: ${{ secrets.GITHUB_TOKEN }}
48+
file_path: 'website/doc_build/web/rsdoctor-data.json'
49+
target_branch: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.event.repository.default_branch }}

0 commit comments

Comments
 (0)