Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d00e9f1
Merge pull request #83 from Friedrich482/features
Friedrich482 Aug 6, 2025
d2e540c
Merge pull request #84 from Friedrich482/features
Friedrich482 Aug 6, 2025
06312bf
Merge pull request #85 from Friedrich482/features
Friedrich482 Aug 6, 2025
65443b5
Merge pull request #86 from Friedrich482/features
Friedrich482 Aug 6, 2025
83ed793
Merge pull request #87 from Friedrich482/features
Friedrich482 Aug 16, 2025
6af18a8
Merge pull request #88 from Friedrich482/features
Friedrich482 Aug 18, 2025
b57e7a3
Merge pull request #89 from Friedrich482/features
Friedrich482 Aug 19, 2025
b6c2599
Merge pull request #90 from Friedrich482/features
Friedrich482 Aug 21, 2025
884b9b1
Merge pull request #91 from Friedrich482/features
Friedrich482 Aug 22, 2025
0d78710
Merge pull request #93 from Friedrich482/features
Friedrich482 Aug 27, 2025
3882991
Merge pull request #94 from Friedrich482/features
Friedrich482 Aug 30, 2025
ffe55b1
Merge pull request #95 from Friedrich482/features
Friedrich482 Sep 2, 2025
4a884fb
Merge pull request #96 from Friedrich482/features
Friedrich482 Oct 17, 2025
b6573f1
Merge pull request #97 from Friedrich482/features
Friedrich482 Oct 17, 2025
5ad7229
Merge pull request #98 from Friedrich482/features
Friedrich482 Oct 19, 2025
86d1a5a
Merge pull request #99 from Friedrich482/features
Friedrich482 Nov 15, 2025
23205c6
ci: ci/cd
Friedrich482 Nov 15, 2025
63bd135
feat: eslint
Friedrich482 Nov 15, 2025
00a06b2
chore: ci/cd
Friedrich482 Nov 15, 2025
99f52c0
build: husky
Friedrich482 Nov 16, 2025
1bf6120
fix: husky
Friedrich482 Nov 16, 2025
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
36 changes: 36 additions & 0 deletions .github/workflows/build-and-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: MoonCode CI/CD Pipeline - Build api docker image and deploy to production

on:
push:
branches: "main"

jobs:
build-and-push-docker-image:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup nodejs
uses: actions/setup-node@v6
with:
node-version: 24
cache: npm

- name: Install dependencies
run: npm install

- name: Lint project
run: npm run lint

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker images
run: |
IMAGE_TAG=${{ github.sha }}
docker buildx build --platform linux/amd64 -t ${{ secrets.DOCKERHUB_USERNAME }}/mooncode-api:$IMAGE_TAG -t ${{ secrets.DOCKERHUB_USERNAME }}/mooncode-api:latest --push -f apps/api/Dockerfile .
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
turbo lint
7 changes: 4 additions & 3 deletions apps/api/src/filters/errorFormatter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { z, ZodError } from "zod";
import { ZodError } from "zod";
import { EnvService } from "src/env/env.service";

import { formatZodError } from "@repo/common/formatZodError";
import { TRPCError } from "@trpc/server";

type ErrorShape = {
Expand Down Expand Up @@ -30,7 +31,7 @@ const errorFormatter = (
if (error.cause && isZodError(error.cause)) {
return {
...shape,
message: z.prettifyError(error.cause),
message: formatZodError(error.cause),
data: {
code: shape.data.code,
httpStatus: shape.data.httpStatus,
Expand All @@ -48,7 +49,7 @@ const errorFormatter = (
if (isZodError(error)) {
return {
...shape,
message: z.prettifyError(error),
message: formatZodError(error),
data: {
code: shape.data.code,
httpStatus: shape.data.httpStatus,
Expand Down
Loading