diff --git a/.github/workflows/CI-build.yml b/.github/workflows/CI-build.yml new file mode 100644 index 0000000..61c4801 --- /dev/null +++ b/.github/workflows/CI-build.yml @@ -0,0 +1,38 @@ +name: Build with Bun + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Bun + run: | + curl -fsSL https://bun.sh/install | bash + echo "$HOME/.bun/bin" >> $GITHUB_PATH + + - name: Install dependencies + run: bun install + + - name: Build + run: bun run build + + - name: Upload client artifact for deployment job + uses: actions/upload-artifact@v4 + with: + name: client-app + path: packages/client/dist + + - name: Upload server artifact for deployment job + uses: actions/upload-artifact@v4 + with: + name: server-app + path: packages/server/dist diff --git a/packages/server/package.json b/packages/server/package.json index 23bce9c..434624f 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -6,7 +6,7 @@ "scripts": { "start": "bun run index.ts", "dev": "bun --watch index.ts", - "build": "bun build index.ts --outdir dist --target node && cp prompts/WonderWorld.md dist/prompts/WonderWorld.md", + "build": "bun build index.ts --outdir dist --target node && mkdir -p dist/prompts && cp prompts/WonderWorld.md dist/prompts/WonderWorld.md", "dist": "bun run ./dist/index.js" }, "devDependencies": {