Skip to content

Commit

Permalink
Add github workfow
Browse files Browse the repository at this point in the history
  • Loading branch information
Somnath-Chattaraj committed May 24, 2024
1 parent fe2965b commit 4c4ade9
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 1 deletion.
59 changes: 59 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI/CD

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:

runs-on: ubuntu-latest

services:
mongodb:
image: mongo:latest
ports:
- 27017:27017
options: >-
--health-cmd="mongo --eval 'db.runCommand({ ping: 1 })'"
--health-interval=10s
--health-timeout=5s
--health-retries=5
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Cache backend node modules
uses: actions/cache@v2
with:
path: backend/node_modules
key: backend-${{ runner.os }}-node_modules-${{ hashFiles('backend/package-lock.json') }}
restore-keys: |
backend-${{ runner.os }}-node_modules-
- name: Cache frontend node modules
uses: actions/cache@v2
with:
path: frontend/node_modules
key: frontend-${{ runner.os }}-node_modules-${{ hashFiles('frontend/package-lock.json') }}
restore-keys: |
frontend-${{ runner.os }}-node_modules-
- name: Install backend dependencies
run: cd backend && npm install

- name: Install frontend dependencies
run: cd frontend && npm install

- name: Build frontend
run: cd frontend && npm run build
2 changes: 1 addition & 1 deletion frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ForgotPassword, Login, SignUp } from "./components";
const App = () => {
return (
<BrowserRouter>
<div className='relative z-0 bg-primary'>
<div className='relative z-0 bg-black'>
<div className='bg-hero-pattern bg-cover bg-no-repeat bg-center'>
</div>
<div className='relative z-0'>
Expand Down

0 comments on commit 4c4ade9

Please sign in to comment.