Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 1 addition & 29 deletions .github/workflows/web-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,35 +30,6 @@ jobs:
with:
node-version: '20'

- name: Setup pnpm
uses: pnpm/action-setup@v4.0.0
with:
version: 9

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- run: pnpm config set "@tiptap-pro:registry" https://registry.tiptap.dev/
- run: pnpm config set "//registry.tiptap.dev/:_authToken" ${{ secrets.TIPTAP_PRIVATE_REGISTRY_KEY }}

- name: Install dependencies
working-directory: ./moon
run: pnpm i --frozen-lockfile

- name: Run ESLint
working-directory: ./moon
run: pnpm run lint

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand All @@ -81,6 +52,7 @@ jobs:
IMAGE_TAG: mega-ui-0.1.0-pre-release
run: |
docker build \
-f apps/web/Dockerfile \
-t $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG .
docker push $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG

Expand Down
2 changes: 1 addition & 1 deletion moon/.prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"^react$",
"<THIRD_PARTY_MODULES>",
"",
"^@campsite/(.*)$",
"^@gitmono/(.*)$",
"",
"^@/(.*)$",
"",
Expand Down
File renamed without changes.
67 changes: 67 additions & 0 deletions moon/apps/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# syntax = docker/dockerfile:1

FROM node:20-slim AS base

# configure pnpm
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable

ARG TIPTAP_PRIVATE_REGISTRY_KEY


# Throw-away build stage to reduce size of final image
FROM base AS builder
# Install packages needed to build node modules
RUN apt-get update -qq && \
apt-get install -y build-essential pkg-config python-is-python3 ca-certificates
WORKDIR /app
RUN pnpm install turbo@2.0.9 --global
COPY . .
RUN turbo prune @gitmono/web --docker
WORKDIR /app


FROM base AS installer
RUN apt-get update -qq && \
apt-get install -y build-essential pkg-config python-is-python3 ca-certificates
WORKDIR /app

COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=builder /app/package.json ./
COPY --from=builder /app/patches ./patches
COPY --from=builder /app/pnpm-workspace.yaml ./


RUN pnpm config set "@tiptap-pro:registry" https://registry.tiptap.dev/
RUN pnpm config set "//registry.tiptap.dev/:_authToken" CjqFil0n7z4GGur+RPric21fBBeSB4R4FoNdRYOE1bQEz6AXLCoANCc+o9rLIg6Q
RUN pnpm install
RUN npx patch-package

COPY --from=builder /app/out/full/ .

RUN npx turbo run build --filter=@gitmono/web


RUN apt-get update -y && apt-get install -y ca-certificates



FROM base AS runner

# Set production environment
ENV NODE_ENV="production"

WORKDIR /app

# Copy built application
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/standalone ./
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static
COPY --from=installer --chown=nextjs:nodejs /app/apps/web/public ./apps/web/public

# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
ENV PORT=3000

ENTRYPOINT [ "node", "/app/apps/web/server.js" ]
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ export default function ToolbarPlugin() {
}),
editor.registerCommand(
SELECTION_CHANGE_COMMAND,
(_payload, newEditor) => {
(_payload, _newEditor) => {
updateToolbar();
return false;
},
Expand Down
15 changes: 8 additions & 7 deletions moon/apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@
"@heroicons/react": "catalog:",
"@hocuspocus/provider": "catalog:",
"@hookform/resolvers": "catalog:",
"@lexical/code": "^0.31.2",
"@lexical/link": "^0.31.2",
"@lexical/list": "^0.31.2",
"@lexical/markdown": "^0.31.2",
"@lexical/code": "catalog:",
"@lexical/link": "catalog:",
"@lexical/list": "catalog:",
"@lexical/markdown": "catalog:",
"@lexical/react": "catalog:",
"@lexical/rich-text": "^0.31.2",
"@lexical/table": "^0.31.2",
"@lexical/rich-text": "catalog:",
"@lexical/table": "catalog:",
"@lexical/utils": "catalog:",
"@lexical/selection": "catalog:",
"@next/bundle-analyzer": "catalog:",
"@octokit/auth-app": "catalog:",
"@octokit/core": "catalog:",
Expand All @@ -47,7 +48,7 @@
"@radix-ui/react-slider": "catalog:",
"@radix-ui/react-slot": "catalog:",
"@radix-ui/react-tabs": "catalog:",
"@radix-ui/themes": "^3.2.1",
"@radix-ui/themes": "catalog:",
"@sentry/nextjs": "catalog:",
"@shopify/react-shortcuts": "catalog:",
"@tanstack/react-query": "catalog:",
Expand Down
Loading