Skip to content

Build and deploy MERN stack #6

Build and deploy MERN stack

Build and deploy MERN stack #6

Workflow file for this run

name: Build and deploy MERN stack
on:
workflow_dispatch:
jobs:
build:
runs-on: machine1
steps:
- name: Checkout repository
uses: actions/[email protected]
# - name: Login to DockerHub
# uses: docker/[email protected]
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# - name: Build and push Docker image
# run: |
# docker build -t hellopradum/backend-wanderlust backend/.
# docker build -t hellopradum/frontend-wanderlust frontend/.
# docker push hellopradum/backend-wanderlust:latest
# docker push hellopradum/frontend-wanderlust:latest
- name: Create and claim persistent volume
run: |
cd kubernetes
sudo su
kubectl apply -f persistentVolume.yaml
kubectl apply -f persistentVolumeClaim.yaml
- name: Deploy MongoDB
run: |
kubectl apply -f mongodb.yaml
- name: Deploy Redis
run: |
kubectl apply -f redis.yaml
- name: Deploy Backend
run: |
kubectl apply -f backend.yaml
- name: Deploy Frontend
run: |
kubectl apply -f frontend.yaml