-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
648ec40
commit ce15094
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |