Skip to content

Commit

Permalink
resolved conflicts between main and prod
Browse files Browse the repository at this point in the history
  • Loading branch information
ykIsCoding committed Dec 7, 2024
2 parents 0a802db + 654ab92 commit ce59e8a
Show file tree
Hide file tree
Showing 92 changed files with 12,353 additions and 10,007 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
cache: "yarn"

- name: Install dependencies
Expand Down
49 changes: 25 additions & 24 deletions .github/workflows/cd-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,30 @@ on:
workflow_dispatch:

jobs:
build-cms:
name: Build CMS Docker Image
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
file: ./apps/cms/docker/staging/Dockerfile
context: .
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/website/cms:${{ github.sha }}
ghcr.io/${{ github.repository_owner }}/website/cms:latest
# TODO: CMS build is currently broken.
# build-cms:
# name: Build CMS Docker Image
# runs-on: ubuntu-22.04
# steps:
# - name: Checkout repo
# uses: actions/checkout@v3

# - name: Login to GitHub Container Registry
# uses: docker/login-action@v1
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}

# - name: Build and push
# uses: docker/build-push-action@v2
# with:
# file: ./apps/cms/docker/staging/Dockerfile
# context: .
# push: true
# tags: |
# ghcr.io/${{ github.repository_owner }}/website/cms:${{ github.sha }}
# ghcr.io/${{ github.repository_owner }}/website/cms:latest

build-merch:
name: Build Merch Docker Image
Expand Down Expand Up @@ -93,7 +94,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
cache: "yarn"

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
cache: "yarn"

- name: Install dependencies
Expand Down
27 changes: 13 additions & 14 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
# more info: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

* @realdyllon
* @chanbakjsd

/.github/** @realdyllon @aryans1204
/deployment/** @realdyllon @aryans1204
/.github/** @chanbakjsd @aryans1204
/deployment/** @chanbakjsd @aryans1204

/apps/cms/** @jamiegoh
/apps/cms/** @jack-thant
/apps/merch/** @chanbakjsd
/apps/web/** @xJQx
/apps/web/** @jack-thant
/apps/challenges/** @BoonHianLim
/apps/web/features/merch/** @chanbakjsd
/apps/web/pages/merch/** @chanbakjsd

/packages/eslint-custom-config/** @realdyllon
/packages/nodelogger/** @realdyllon
/packages/schemas/** @realdyllon
/packages/schemas/lib/cms.graphql @jamiegoh
/packages/tsconfig/** @realdyllon
/packages/types/** @realdyllon
/packages/types/lib/cms.ts @jamiegoh
/packages/eslint-custom-config/** @chanbakjsd
/packages/nodelogger/** @chanbakjsd
/packages/schemas/** @chanbakjsd
/packages/schemas/lib/cms.graphql @jack-thant
/packages/tsconfig/** @chanbakjsd
/packages/types/** @chanbakjsd
/packages/types/lib/merch.ts @chanbakjsd
/packages/ui/** @xJQx
/packages/ui/merch/** @chanbakjsd
/packages/ui/** @chanbakjsd

2 changes: 1 addition & 1 deletion apps/cms/docker/development/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
command:
- --storageEngine=wiredTiger
volumes:
- ./data:/data/db
- data:/data/db

volumes:
data:
9 changes: 5 additions & 4 deletions apps/cms/docker/staging/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine AS builder
FROM node:18-alpine AS builder

RUN apk add --no-cache libc6-compat
RUN apk update
Expand All @@ -11,7 +11,7 @@ RUN rm -rf **/node_modules **/build **/dist **/out **/.turbo
RUN rm -rf **/.env
RUN turbo prune --scope=cms --docker

FROM node:16-alpine AS installer
FROM node:18-alpine AS installer
# Add lockfile and package.json's of isolated subworkspace
RUN apk add --no-cache libc6-compat
RUN apk update
Expand All @@ -21,14 +21,15 @@ WORKDIR /app
COPY .gitignore .gitignore
COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/yarn.lock ./yarn.lock
RUN yarn install
RUN yarn --version
RUN yarn install --verbose

# Build the project and its dependencies
COPY --from=builder /app/out/full/ .
COPY turbo.json turbo.json
RUN yarn turbo run build --filter=cms...

FROM node:16-alpine AS runner
FROM node:18-alpine AS runner

WORKDIR /app

Expand Down
12 changes: 9 additions & 3 deletions apps/cms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,17 @@
},
"dependencies": {
"@aws-sdk/client-s3": "^3.262.0",
"@payloadcms/plugin-cloud-storage": "^1.0.12",
"@aws-sdk/lib-storage": "^3.535.0",
"@payloadcms/bundler-webpack": "^1.0.7",
"@payloadcms/db-mongodb": "^1.7.2",
"@payloadcms/plugin-cloud-storage": "~1.0.19",
"@payloadcms/richtext-slate": "^1.5.2",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"payload": "^1.8.3",
"express": "^4.19.2",
"payload": "^2.27.0",
"querystring-es3": "^0.2.1",
"react": "^18.0.0",
"react-toastify": "10.0.5",
"tsconfig": "*"
},
"devDependencies": {
Expand Down
17 changes: 8 additions & 9 deletions apps/cms/src/@types/Order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@

export class Order {
constructor(
public order_id = '',
public date = new Date(),
public order_person = '',
public image_url = '',
public item = '',
public qty = 0,
public size = '',
public colour = ''

public id = '',
public transactionId = '',
public transactionTime = '',
public paymentMethod = '',
public customerEmail = '',
public status = '',
public updatedAt = '',
public createdAt = ''
) { }
}
5 changes: 5 additions & 0 deletions apps/cms/src/admin/components/AfterNavLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ const merchRoutes = [
label: "Products",
href: "/admin/merch/products",
},
{
id: "merch_promotions",
label: "Promotions",
href: "/admin/merch/promotions",
},
];

const MerchLinks: React.FC = () => {
Expand Down
2 changes: 1 addition & 1 deletion apps/cms/src/admin/components/BeforeNavLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
const Title = () => {
return (
<h4>
SCSE Club <br /> Admin Panel
SCDS Club <br /> Admin Panel
</h4>
);
};
Expand Down
2 changes: 1 addition & 1 deletion apps/cms/src/admin/graphics/Logos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ const SCSEImage = ({ classname }: SCSEImageProps) => {
};

export const SCSEIcon = () => <SCSEImage classname="scse-icon" />;
export const SCSELogo = () => <SCSEImage classname="scse-logo" />;
export const SCSELogo = () => <SCSEImage classname="scse-logo" />;
2 changes: 1 addition & 1 deletion apps/cms/src/admin/styles.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
header {
}
}
Loading

0 comments on commit ce59e8a

Please sign in to comment.