diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8bb63d2a..da2e4ccb 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,7 +15,4 @@ jobs: with: version: 9 - run: pnpm install - - uses: reviewdog/action-eslint@v1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - eslint_flags: ". --ext js,jsx,ts,tsx --ignore-path=.gitignore" + - run: pnpm lint diff --git a/app/components/BlogCards.tsx b/app/components/BlogCards.tsx new file mode 100644 index 00000000..4189fef2 --- /dev/null +++ b/app/components/BlogCards.tsx @@ -0,0 +1,59 @@ +import React from "react"; + +interface BlogCardProps { + title: string; + description: string; + date: string; + authorName: string; + authorProfilePicture: string; + tag: string; + timeOfReading: string; + blogImage: string; + link: string; +} + +const BlogCard: React.FC = ({ + title, + description, + date, + authorName, + authorProfilePicture, + tag, + timeOfReading, + blogImage, + link, +}) => { + return ( +
+ {title} +
+
+ + {tag} +
+
+ +

{title}

+
+

{description}

+
+
+ {date} + {timeOfReading} mins Read +
+
+ {authorName} +
+

{authorName}

+
+
+
+
+ ); +}; + +export default BlogCard; diff --git a/docker/development/Dockerfile b/docker/development/Dockerfile index f4ab8136..a54ba220 100644 --- a/docker/development/Dockerfile +++ b/docker/development/Dockerfile @@ -1,22 +1,28 @@ # Stage 1: Build FROM node:20-alpine AS builder +# Install pnpm +RUN npm install -g pnpm + # Set working directory WORKDIR /app # Install dependencies -COPY package.json package-lock.json ./ -RUN npm install +COPY package.json pnpm-lock.yaml ./ +RUN pnpm install # Copy all files COPY . . # Build the application -RUN npm run build +RUN pnpm run build # Stage 2: Production Image FROM node:20-alpine AS runner +# Install pnpm +RUN npm install -g pnpm + # Set NODE_ENV to production ENV NODE_ENV=production @@ -24,16 +30,15 @@ ENV NODE_ENV=production WORKDIR /app # Copy only necessary files from build stage -COPY --from=builder /app/package.json /app/package-lock.json ./ +COPY --from=builder /app/package.json /app/pnpm-lock.yaml ./ COPY --from=builder /app/build ./build COPY --from=builder /app/public ./public # Install only production dependencies -RUN npm install --production +RUN pnpm install --prod # Expose the port the app runs on EXPOSE 3000 # Command to run the application -CMD ["npm", "start"] - +CMD ["pnpm", "start"] \ No newline at end of file diff --git a/docker/prod/Dockerfile b/docker/prod/Dockerfile index f4ab8136..a54ba220 100644 --- a/docker/prod/Dockerfile +++ b/docker/prod/Dockerfile @@ -1,22 +1,28 @@ # Stage 1: Build FROM node:20-alpine AS builder +# Install pnpm +RUN npm install -g pnpm + # Set working directory WORKDIR /app # Install dependencies -COPY package.json package-lock.json ./ -RUN npm install +COPY package.json pnpm-lock.yaml ./ +RUN pnpm install # Copy all files COPY . . # Build the application -RUN npm run build +RUN pnpm run build # Stage 2: Production Image FROM node:20-alpine AS runner +# Install pnpm +RUN npm install -g pnpm + # Set NODE_ENV to production ENV NODE_ENV=production @@ -24,16 +30,15 @@ ENV NODE_ENV=production WORKDIR /app # Copy only necessary files from build stage -COPY --from=builder /app/package.json /app/package-lock.json ./ +COPY --from=builder /app/package.json /app/pnpm-lock.yaml ./ COPY --from=builder /app/build ./build COPY --from=builder /app/public ./public # Install only production dependencies -RUN npm install --production +RUN pnpm install --prod # Expose the port the app runs on EXPOSE 3000 # Command to run the application -CMD ["npm", "start"] - +CMD ["pnpm", "start"] \ No newline at end of file diff --git a/docker/staging/Dockerfile b/docker/staging/Dockerfile index 66ec834c..a54ba220 100644 --- a/docker/staging/Dockerfile +++ b/docker/staging/Dockerfile @@ -1,22 +1,28 @@ # Stage 1: Build FROM node:20-alpine AS builder +# Install pnpm +RUN npm install -g pnpm + # Set working directory WORKDIR /app # Install dependencies -COPY package.json package-lock.json ./ -RUN npm install +COPY package.json pnpm-lock.yaml ./ +RUN pnpm install # Copy all files COPY . . # Build the application -RUN npm run build +RUN pnpm run build # Stage 2: Production Image FROM node:20-alpine AS runner +# Install pnpm +RUN npm install -g pnpm + # Set NODE_ENV to production ENV NODE_ENV=production @@ -24,15 +30,15 @@ ENV NODE_ENV=production WORKDIR /app # Copy only necessary files from build stage -COPY --from=builder /app/package.json /app/package-lock.json ./ +COPY --from=builder /app/package.json /app/pnpm-lock.yaml ./ COPY --from=builder /app/build ./build COPY --from=builder /app/public ./public # Install only production dependencies -RUN npm install --production +RUN pnpm install --prod # Expose the port the app runs on EXPOSE 3000 # Command to run the application -CMD ["npm", "start"] \ No newline at end of file +CMD ["pnpm", "start"] \ No newline at end of file diff --git a/public/blogImage.png b/public/blogImage.png new file mode 100644 index 00000000..a3904563 Binary files /dev/null and b/public/blogImage.png differ diff --git a/public/profileImage.png b/public/profileImage.png new file mode 100644 index 00000000..7d43eb31 Binary files /dev/null and b/public/profileImage.png differ