feat: add pnpm build step to Dockerfile
Some checks failed
Deploy Jekyll site to Pages / build (push) Has been cancelled
Deploy Jekyll site to Pages / deploy (push) Has been cancelled

Add Node.js and pnpm to build stage to run `pnpm build:all` before Jekyll build. This ensures all assets are properly built before site generation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-15 15:40:34 +01:00
parent 1951554367
commit e9285418b1

View File

@@ -2,18 +2,28 @@
FROM ruby:3.4.1-alpine AS builder FROM ruby:3.4.1-alpine AS builder
# Install build dependencies # Install build dependencies
RUN apk add --no-cache build-base RUN apk add --no-cache build-base nodejs npm
# Enable corepack for pnpm
RUN corepack enable
# Set working directory # Set working directory
WORKDIR /app WORKDIR /app
# Copy Gemfile and install dependencies # Copy package files and install Node dependencies
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
# Copy Gemfile and install Ruby dependencies
COPY Gemfile Gemfile.lock ./ COPY Gemfile Gemfile.lock ./
RUN bundle install RUN bundle install
# Copy source files # Copy source files
COPY . . COPY . .
# Build assets with pnpm
RUN pnpm build:all
# Build Jekyll site # Build Jekyll site
RUN bundle exec jekyll build RUN bundle exec jekyll build