Files
BrewJournal/.gitea/workflows/deploy.yml
Aditya Gupta a0b1efd242
All checks were successful
Deploy Brew Application / deploy (push) Successful in 11s
fix: prevent shallow clone and get full history with tags
2026-06-06 18:10:30 +05:30

35 lines
680 B
YAML

name: Deploy Brew Application
on:
push:
branches:
- master
jobs:
deploy:
runs-on: production
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build Frontend
env:
CI: "true"
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 restart brew-backend || pm2 start index.js --name "brew-backend"