feat: update CI/CD workflows and Dockerfile for improved WASM build process

Kim committed Nov 15, 2025 at 13:39 UTC 7438c736b2b94845ec6e79b8a86fcb29e0f48768
4 files changed +12 -4
.dockerignore
-1
@@ -1,4 +1,3 @@
1 -dist/
1 bin/
2 docker-compose.override.yaml
3
.github/workflows/cd.yml
+3
@@ -48,6 +48,9 @@ jobs:
48 type=semver,pattern={{major}}.{{minor}}
49 type=semver,pattern={{major}}
50
51 + - name: Pre-build WASM artifacts
52 + run: make build-wasm compress-wasm
53 +
54 - name: Build and push Docker image
55 uses: docker/build-push-action@v6
56 with:
.github/workflows/ci.yml
+1 -1
@@ -4,7 +4,7 @@ on:
4 pull_request:
5 branches: [main]
6 push:
7 - branches: "*"
7 + branches: ["*"]
8 workflow_dispatch:
9
10 jobs:
Dockerfile
+8 -2
@@ -17,8 +17,14 @@ RUN go mod download
17 # Copy the rest of the source code
18 COPY . .
19
20 -# Build WASM, precompress, and server
21 -RUN make build-wasm compress-wasm build-server
20 +# Build WASM (if needed), precompress, and server
21 +RUN if ls dist/[0-9a-f]*.wasm.br >/dev/null 2>&1; then \
22 + echo "[docker] Using prebuilt WASM artifacts in dist/"; \
23 + else \
24 + echo "[docker] No prebuilt WASM found; running make build-wasm compress-wasm"; \
25 + make build-wasm compress-wasm; \
26 + fi && \
27 + make build-server
28
29 FROM gcr.io/distroless/static-debian12:nonroot
30