Skip to content

Commit

Permalink
implemented CI-CD
Browse files Browse the repository at this point in the history
  • Loading branch information
Samiul-Islam-123 committed Jul 27, 2024
1 parent ddc56af commit 09d4693
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 4 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI/CD Pipeline

on:
push:
branches:
- development

jobs:
build:
runs-on: self-hosted # Self-hosted Ubuntu runner

steps:
- name: Checkout code
uses: actions/checkout@v2 # Action to checkout your repository

- name: Stop PM2 process "node"
run: |
if pm2 list | grep -q 'node'; then
pm2 stop node
else
echo "PM2 process 'node' is not running."
fi
- name: Install Backend Dependencies
run: |
cd backend
npm install
- name: Install Frontend Dependencies
run: |
cd frontend
npm install
- name: Start Backend Application with PM2
run: |
cd backend
pm2 start index.js --name node # Start your backend application using PM2, replace 'index.js' with your entry file if different
- name: Start Frontend Application
run: |
cd frontend
npm start & # Start your frontend application, replace 'npm start' with your actual start command if different
- name: Tunnel Frontend with Telebit
run: |
cd frontend
telebit http 3000 # Tunnel the frontend application using Telebit, replace '3000' with your frontend port if different
8 changes: 4 additions & 4 deletions frontend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<ThemeContextProvider>

<BrowserRouter>
<ClerkProvider publishableKey={PUBLISHABLE_KEY}>
<BrowserRouter>
<ClerkProvider publishableKey={PUBLISHABLE_KEY}>
<SocketProvider>
<LoadingProvider>

Expand All @@ -31,8 +31,8 @@ root.render(
</MessageProvider>
</LoadingProvider>
</SocketProvider>
</ClerkProvider>
</BrowserRouter>
</ClerkProvider>
</BrowserRouter>
</ThemeContextProvider>
);

Expand Down

0 comments on commit 09d4693

Please sign in to comment.