diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 9808047..ee48b77 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -11,6 +11,28 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v4 - - uses: oven-sh/setup-bun@v2 - - run: bun install --frozen-lockfile - - run: bun biome ci + - uses: actions/setup-node@v4 + with: + node-version: "20" + - run: npm ci + - run: npx biome ci + client-build: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "20" + - run: npm ci + - run: cd client && bash build.sh + server-build: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "20" + - run: npm ci + - run: cd server && npm run build diff --git a/client/build.sh b/client/build.sh index ed6334f..61a679d 100644 --- a/client/build.sh +++ b/client/build.sh @@ -1,3 +1,10 @@ +# TODO: common のみに依存するようにする +cd .. +npm ci +cd server +npm run build +cd ../client + if [[ "$CF_PAGES_BRANCH" == "main" ]]; then npm run build else diff --git a/server/package.json b/server/package.json index 03d68bf..1409050 100644 --- a/server/package.json +++ b/server/package.json @@ -5,7 +5,8 @@ "main": "index.js", "scripts": { "dev": "tsx watch src/main.ts", - "build": "npx tsc", + "prebuild": "prisma generate", + "build": "tsc", "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [],