@@ -16,7 +16,6 @@ permissions:
1616
1717jobs :
1818 changes :
19- name : detect changes
2019 runs-on : ubuntu-latest
2120 outputs :
2221 site : ${{ steps.filter.outputs.site }}
3433 - 'pnpm-workspace.yaml'
3534
3635 cli :
37- name : cli (typecheck, test, demo)
3836 runs-on : ubuntu-latest
3937 steps :
4038 - uses : actions/checkout@v4
@@ -43,21 +41,22 @@ jobs:
4341 uses : actions/setup-node@v4
4442 with :
4543 node-version : 20
46- cache : ' pnpm'
44+ cache : pnpm
4745
48- - name : setup pnpm
49- uses : pnpm/action-setup@v4
50- with :
51- version : 9
46+ - name : enable corepack (pnpm)
47+ run : |
48+ corepack enable
49+ corepack prepare pnpm@9 --activate
50+ pnpm -v
5251
5352 - name : install
5453 run : pnpm install --frozen-lockfile
5554
5655 - name : typecheck
57- run : pnpm -w -r run typecheck || pnpm -w -r exec tsc -v && echo "no typecheck script; skipping "
56+ run : pnpm -w -r run typecheck || echo "no typecheck script"
5857
5958 - name : build (if any)
60- run : pnpm -w -r run build || echo "no build scripts; skipping "
59+ run : pnpm -w -r run build || echo "no build scripts"
6160
6261 - name : test
6362 env :
9493 retention-days : 7
9594
9695 site :
97- name : site (Next.js)
9896 needs : changes
9997 if : needs.changes.outputs.site == 'true'
10098 runs-on : ubuntu-latest
@@ -105,12 +103,13 @@ jobs:
105103 uses : actions/setup-node@v4
106104 with :
107105 node-version : 20
108- cache : ' pnpm'
106+ cache : pnpm
109107
110- - name : setup pnpm
111- uses : pnpm/action-setup@v4
112- with :
113- version : 9
108+ - name : enable corepack (pnpm)
109+ run : |
110+ corepack enable
111+ corepack prepare pnpm@9 --activate
112+ pnpm -v
114113
115114 - name : install
116115 run : pnpm install --frozen-lockfile
@@ -119,16 +118,11 @@ jobs:
119118 working-directory : apps/site
120119 run : pnpm build
121120
122- - name : export site (optional)
123- working-directory : apps/site
124- run : pnpm -s next build || echo "no next export; skipping"
125-
126121 - name : upload site build
127122 if : always()
128123 uses : actions/upload-artifact@v4
129124 with :
130125 name : site-build
131- path : |
132- apps/site/.next
126+ path : apps/site/.next
133127 if-no-files-found : ignore
134128 retention-days : 7
0 commit comments