Skip to content

Commit

Permalink
Create deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
pradumchintamani authored Jun 22, 2024
1 parent 648ec40 commit ce15094
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Docker Build and Kubernetes Deploy

on:
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Configure kubectl
run: |
mkdir -p ~/.kube
echo "$KUBE_CONFIG" | base64 -d > ~/.kube/config
kubectl version --client
- 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

0 comments on commit ce15094

Please sign in to comment.