-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ddc56af
commit 09d4693
Showing
2 changed files
with
51 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters