setup for backend only #5
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
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: 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: tunnel backend with telebit | |
run: | ./telebit http 5500 | |