Skip to content

Merge pull request #15 from Team-Wander/feature/approveAppointmentModal #14

Merge pull request #15 from Team-Wander/feature/approveAppointmentModal

Merge pull request #15 from Team-Wander/feature/approveAppointmentModal #14

Workflow file for this run

name: React CI/CD Pipeline with Nginx
on:
push:
branches: ["develop"]
permissions:
contents: read
jobs:
build:
name: Build and Test React App
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Build React App
run: npm run build
env:
CI: ""
deploy:
name: Deploy to Nginx Server
runs-on: self-hosted
needs: build
steps:
- name: Deploy to Nginx
run: |
sudo rm -rf /var/www/html/*
sudo cp -r build/* /var/www/html/
- name: Restart Nginx
run: sudo systemctl restart nginx