forked from PalTVEngineering/Kit-Booking-System-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (23 loc) · 862 Bytes
/
Copy pathdeploy.yml
File metadata and controls
30 lines (23 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#DO NOT CHANGE
name: Deploy Frontend to Production
# This workflow runs on any push to the 'main' branch
on:
push:
branches: [ main ]
jobs:
deploy:
# This job MUST run on your self-hosted runner
runs-on: self-hosted
steps:
- name: 'Pull Latest Code & Rebuild Frontend Container'
run: |
echo "Starting Frontend deployment..."
# Go into the Frontend's specific source code directory on the VM
cd /opt/booking_system/frontend
# Pull the latest changes from the main branch
git pull
# Go back to the main project directory to access the docker-compose file
cd /opt/booking_system
# Rebuild and restart ONLY the frontend service
docker compose up -d --build frontend
echo "Frontend deployment successful!"