feat: setup CD

This commit is contained in:
2026-06-06 14:07:50 +05:30
parent 9d98966a8e
commit 1064c724f7

View File

@@ -0,0 +1,31 @@
name: Deploy Brew Application
on:
push:
branches:
- main # Change this to 'master' if that is your default branch
jobs:
deploy:
runs-on: production
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Build Frontend
run: |
npm install
rm -rf dist/
npm run build
- name: Deploy Frontend Files
run: |
rm -rf /var/www/brew/dist/
cp -r dist/ /var/www/brew/
- name: Restart Backend with PM2
run: |
cd server
npm install
pm2 trigger or restart brew-backend || pm2 start index.js --name "brew-backend"