All checks were successful
Deploy Brew Application / deploy (push) Successful in 17s
31 lines
618 B
YAML
31 lines
618 B
YAML
name: Deploy Brew Application
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
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" |