Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
riddhesh-mahajan committed Oct 30, 2023
1 parent ab7f73d commit 0ca3238
Show file tree
Hide file tree
Showing 40 changed files with 104 additions and 26 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/DeployPipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: DeployPipeline

on:
push:
branches: ["pipeline-dev2"]

jobs:
deploy:
name: Build And Deploy
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Delete .git
run: rm -rf .git
- name: Debug - List Files in Build Directory
run: ls -al ./
- name: Copy build to EC2
uses: appleboy/scp-action@master
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_SSH_KEY }}
source: ./
target: /home/ubuntu/slash/
overwrite: true

- name: SSH into EC2 and restart app
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_SSH_KEY }}
script: |
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
cd ./slash/apps/landing
pm2 stop slash_landing
pm2 delete slash_landing --force
pm2 start yarn --name slash_landing -- start
cd ../admin
pm2 stop slash_admin
pm2 delete slash_admin --force
pm2 start yarn --name slash_admin -- start
cd ../web
pm2 stop slash_web
pm2 delete slash_web --force
pm2 start yarn --name slash_web -- start
cd ../backend
pm2 stop slash_backend
pm2 delete slash_backend --force
pm2 start yarn --name slash_backend -- start
cd ../code_executor
pm2 stop slash_code_executor
pm2 delete slash_code_executor --force
pm2 start yarn --name slash_code_executor -- start
2 changes: 1 addition & 1 deletion apps/admin/.next/cache/.tsbuildinfo

Large diffs are not rendered by default.

Binary file modified apps/admin/.next/cache/webpack/client-production/1.pack
Binary file not shown.
Binary file modified apps/admin/.next/cache/webpack/client-production/2.pack
Binary file not shown.
Binary file modified apps/admin/.next/cache/webpack/client-production/index.pack.old
Binary file not shown.
8 changes: 6 additions & 2 deletions apps/admin/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {
eslint: {
ignoreDuringBuilds: true,
},
};

module.exports = nextConfig
module.exports = nextConfig;
Binary file modified apps/backend/.next/cache/webpack/client-production/3.pack
Binary file not shown.

This file was deleted.

This file was deleted.

5 changes: 4 additions & 1 deletion apps/backend/app/api/questions/[id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import statuscodes from "statuscodes";

const prisma = new PrismaClient();

export async function GET(params: { id: number }, request: Request) {
export async function GET(
request: Request,
{ params }: { params: { id: number } }
) {
const targetQuestion = await prisma.qa.findFirst({
where: { id: params.id },
});
Expand Down
3 changes: 3 additions & 0 deletions apps/backend/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ module.exports = {
},
];
},
eslint: {
ignoreDuringBuilds: true,
},
};
Binary file modified apps/code_executor/.next/cache/webpack/client-production/3.pack
Binary file not shown.
2 changes: 1 addition & 1 deletion apps/code_executor/.next/next-minimal-server.js.nft.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/code_executor/.next/next-server.js.nft.json

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

8 changes: 6 additions & 2 deletions apps/code_executor/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {
eslint: {
ignoreDuringBuilds: true,
},
};

module.exports = nextConfig
module.exports = nextConfig;
Binary file modified apps/landing/.next/cache/webpack/client-production/3.pack
Binary file not shown.
Binary file modified apps/landing/.next/cache/webpack/client-production/4.pack
Binary file not shown.
Binary file modified apps/landing/.next/cache/webpack/server-production/1.pack
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion apps/landing/.next/next-minimal-server.js.nft.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/landing/.next/next-server.js.nft.json

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

8 changes: 6 additions & 2 deletions apps/landing/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {
eslint: {
ignoreDuringBuilds: true,
},
};

module.exports = nextConfig
module.exports = nextConfig;
Binary file modified apps/web/.next/cache/webpack/client-production/3.pack
Binary file not shown.
Binary file modified apps/web/.next/cache/webpack/client-production/4.pack
Binary file not shown.
Binary file modified apps/web/.next/cache/webpack/server-production/1.pack
Binary file not shown.
Binary file modified apps/web/.next/cache/webpack/server-production/index.pack.old
Binary file not shown.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion apps/web/app/(protectedRoutes)/(panel)/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { useEffect, useState } from "react";
import CalendarHeatmap from "react-calendar-heatmap";
import "react-calendar-heatmap/dist/styles.css";
import moment from "moment";
import Card from "components/Card";
import Card from "components/card";

ChartJS.register(
CategoryScale,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(protectedRoutes)/(panel)/questions/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { axiosInstance } from "@utilsaxiosHelpers";
import Question from "components/Question";
import Question from "components/question";
import { useEffect, useState } from "react";

type questionData = {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/(protectedRoutes)/(panel)/solve/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { faSpinner } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import CodeEditor from "@uiw/react-textarea-code-editor";
import { axiosInstance } from "@utilsaxiosHelpers";
import TestcaseResult from "components/TestcaseResult";
import TestcaseResult from "components/testcaseResult";
import React, { useEffect, useState } from "react";

type question = {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Card({
}: {
title: string;
value?: string | number;
}): React.ReactNode {
}): JSX.Element {
return (
<div className="p-5 rounded-md bg-slate-800">
<p className="mb-3 text-md">{title}</p>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/Question.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function Question({
id: string;
};
index: number;
}) {
}): JSX.Element {
return (
<Link href={`/solve/${questionData.id}`} key={index}>
<li className="flex px-5 py-5 mb-3 border-2 border-white rounded-lg cursor-pointer hover:bg-white hover:text-black">
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/TestcaseResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function TestcaseResult({
}: {
out: { in: string; out: string; answer: string };
index: number;
}) {
}): JSX.Element {
return (
<div className="mb-2">
<div className="p-2 mb-1 bg-slate-800">
Expand Down
3 changes: 3 additions & 0 deletions apps/web/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
module.exports = {
reactStrictMode: true,
transpilePackages: ["ui"],
eslint: {
ignoreDuringBuilds: true,
},
};
2 changes: 2 additions & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"lint": "next lint"
},
"dependencies": {
"@fortawesome/free-solid-svg-icons": "^6.4.2",
"@fortawesome/react-fontawesome": "^0.2.0",
"@types/react-chartjs-2": "^2.5.7",
"@uiw/react-textarea-code-editor": "^2.1.9",
"chart.js": "^4.4.0",
Expand Down

0 comments on commit 0ca3238

Please sign in to comment.