Skip to content

Commit

Permalink
ci: add deploy ui workflow and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
NikhilSharma03 committed Jan 14, 2024
1 parent 3b21309 commit df07730
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 28 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy UI Workflow

on:
push:
branches:
- main

jobs:
deploy:
name: Deploy Job
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: ui
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install and Build
run: |
npm ci
npm run build
env:
REACT_APP_API_ENDPOINT: ${{ secrets.DEVMIND_API_ENDPOINT }}
SKIP_PREFLIGHT_CHECK: true

- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./ui/build
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ setup-ui-libs:

.PHONY: run-ui-dev
run-ui-dev:
cd ui; npm start; cd ..
cd ui; npm run dev; cd ..

.PHONY: build-ui
build-ui:
Expand Down
70 changes: 43 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<div align="center">
<br>

<img width=100% src="https://github.com/NikhilSharma03/DevMind/blob/main/assets/docs.png"></p>
<img width=100% src="./assets/docs.png"></p>

</div>

<div align="center">
<br>

[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=95)](https://github.com/NikhilSharma03/DevMind)
[![Build by Nikhil](https://img.shields.io/badge/Built%20by-Nikhil-Green)](https://github.com/NikhilSharma03/DevMind)
[![Build by Nikhil](https://img.shields.io/badge/Built%20by-Nikhil-Green)](https://github.com/NikhilSharma03/DevMind)

</div>

Expand All @@ -25,19 +25,19 @@

<h3 align="center">Languages</h3>

<div align="center">
<div align="center">

<img alt="JavaScript" src="https://img.shields.io/badge/javascript%20-%23323330.svg?&style=for-the-badge&logo=javascript&logoColor=%23F7DF1E"/> <img alt="HTML5"
<img alt="TypeScript" src="https://img.shields.io/badge/typescript%20-%23323330.svg?&style=for-the-badge&logo=typescript"/> <img alt="JavaScript" src="https://img.shields.io/badge/javascript%20-%23323330.svg?&style=for-the-badge&logo=javascript&logoColor=%23F7DF1E"/> <img alt="HTML5"
src="https://img.shields.io/badge/html5%20-%23E34F26.svg?&style=for-the-badge&logo=html5&logoColor=white"/> <img alt="CSS3"
src="https://img.shields.io/badge/css3%20-%231572B6.svg?&style=for-the-badge&logo=css3&logoColor=white"/>

</div>

<br>

<h3 align="center">Library & Frameworks</h3>

<div align="center">
<div align="center">

<img alt="NodeJS" src="https://img.shields.io/badge/node.js%20-%2343853D.svg?&style=for-the-badge&logo=node.js&logoColor=white"/> <img alt="Express.js" src="https://img.shields.io/badge/express.js%20-%23404d59.svg?&style=for-the-badge"/> <img alt="MongoDB" src ="https://img.shields.io/badge/MongoDB-%234ea94b.svg?&style=for-the-badge&logo=mongodb&logoColor=white"/> <img alt="Mongoose" src ="https://img.shields.io/badge/Mongoose-%234ea94b.svg?&style=for-the-badge&logo=Mongoose&logoColor=white"/>
[![React](https://img.shields.io/badge/react-%2320232a.svg?style=for-the-badge&logo=react&logoColor=%2361DAFB)](https://reactjs.org/docs/getting-started.html)
Expand All @@ -48,7 +48,7 @@ src="https://img.shields.io/badge/css3%20-%231572B6.svg?&style=for-the-badge&log

<h3 align="center">Project Management Tools</h3>

<div align="center">
<div align="center">

<img alt="GitHub" src="https://img.shields.io/badge/github%20-%23121011.svg?&style=for-the-badge&logo=github&logoColor=white"/> <img alt="Git" src="https://img.shields.io/badge/git%20-%23F05033.svg?&style=for-the-badge&logo=git&logoColor=white"/>

Expand All @@ -58,55 +58,71 @@ src="https://img.shields.io/badge/css3%20-%231572B6.svg?&style=for-the-badge&log

## Setup and Installation

First install the server dependency,
First install the `server` dependency,

```
make setup-server-libs
```
```

Now to run server, first add `Environment Variables` by creating a new `.env` file in `server` folder and add the contents following `.env.example`
Now to run server, first add `Environment Variables` by creating a new `.env` file at `root` level and add the contents following `.env.example`

Once you have added correct credentials, start the server

```
make run-server
```
```

To get auto reload, start the dev server,

```
make run-server-dev
```

<br>
```

Now to run Client UI, First install the client dependency,
If using `docker compose`, then first build the image

```
make setup-ui-libs
```
make compose-dev-build
```

Now to run client, first add `Environment Variables` by creating a new `.env` file in `client` folder and add the contents following `.env.example`
Now start the dev server

```
make compose-dev-up
```

Once you have added correct credentials, start the client
To access logs

```
make run-ui
```
make compose-dev-logs
```

To build client ui,
To shut down the server

```
make build-ui
```
make compose-dev-down
```

<br>

If you want to use docker,
Now to run `UI`, First install the UI dependency,

```
make setup-ui-libs
```

Now to run UI, first add `Environment Variables` by creating a new `.env` file in `ui` folder and add the contents following `.env.example`

Once you have added correct credentials, start the ui

```
make run-ui-dev
```

To build ui,

```
make build-ui
```
docker-compose up --build
```

<br>

Expand Down

0 comments on commit df07730

Please sign in to comment.