File tree Expand file tree Collapse file tree 2 files changed +10
-30
lines changed
Expand file tree Collapse file tree 2 files changed +10
-30
lines changed Original file line number Diff line number Diff line change 1- name : Deploy to GitHub Pages
1+ name : Build Check
22
33on :
44 push :
55 branches : [main]
6+ pull_request :
67 workflow_dispatch :
78
8- permissions :
9- contents : read
10- pages : write
11- id-token : write
12-
13- concurrency :
14- group : " pages"
15- cancel-in-progress : true
16-
179jobs :
1810 build :
1911 runs-on : ubuntu-latest
@@ -30,24 +22,10 @@ jobs:
3022 - uses : actions/setup-node@v4
3123 with :
3224 node-version : 20
33- cache : " pnpm"
25+ cache : pnpm
3426
3527 - run : pnpm install --frozen-lockfile
36- - run : pnpm run build # ← 只需要 build,静态站会输出到 ./out
37-
38- # (可选)避免被 Jekyll 处理
39- - run : touch ./out/.nojekyll
40-
41- - uses : actions/upload-pages-artifact@v3
42- with :
43- path : ./out
44-
45- deploy :
46- needs : build
47- runs-on : ubuntu-latest
48- environment :
49- name : github-pages
50- url : ${{ steps.deployment.outputs.page_url }}
51- steps :
52- - id : deployment
53- uses : actions/deploy-pages@v4
28+ - run : pnpm run lint
29+ - run : pnpm run lint:images
30+ - run : pnpm run typecheck
31+ - run : pnpm run build
Original file line number Diff line number Diff line change 99 "postinstall" : " fumadocs-mdx" ,
1010 "prepare" : " husky" ,
1111 "lint:images" : " node scripts/check-images.mjs" ,
12- "migrate:images" : " node scripts/move-doc-images.mjs"
12+ "migrate:images" : " node scripts/move-doc-images.mjs" ,
13+ "lint" : " next lint" ,
14+ "typecheck" : " tsc --noEmit"
1315 },
1416 "dependencies" : {
1517 "@giscus/react" : " ^3.1.0" ,
You can’t perform that action at this time.
0 commit comments