Skip to content

Commit f755d34

Browse files
authored
prisma generate を先に実行するワークアラウンド (#47)
* chore: change to npm * chore: add build check * chore: build check の install コマンドを修正 * chore: prisma generate を先に実行させるワークアラウンド
1 parent c981d02 commit f755d34

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

.github/workflows/check.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,28 @@ jobs:
1111
timeout-minutes: 10
1212
steps:
1313
- uses: actions/checkout@v4
14-
- uses: oven-sh/setup-bun@v2
15-
- run: bun install --frozen-lockfile
16-
- run: bun biome ci
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: "20"
17+
- run: npm ci
18+
- run: npx biome ci
19+
client-build:
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 10
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version: "20"
27+
- run: npm ci
28+
- run: cd client && bash build.sh
29+
server-build:
30+
runs-on: ubuntu-latest
31+
timeout-minutes: 10
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: actions/setup-node@v4
35+
with:
36+
node-version: "20"
37+
- run: npm ci
38+
- run: cd server && npm run build

client/build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# TODO: common のみに依存するようにする
2+
cd ..
3+
npm ci
4+
cd server
5+
npm run build
6+
cd ../client
7+
18
if [[ "$CF_PAGES_BRANCH" == "main" ]]; then
29
npm run build
310
else

server/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"main": "index.js",
66
"scripts": {
77
"dev": "tsx watch src/main.ts",
8-
"build": "npx tsc",
8+
"prebuild": "prisma generate",
9+
"build": "tsc",
910
"test": "echo \"Error: no test specified\" && exit 1"
1011
},
1112
"keywords": [],

0 commit comments

Comments
 (0)