You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- name: Deploy to K8's
run: |
# Delete the existing deployment if it exists
if kubectl get deployment tic-tac-toe &>/dev/null; then
kubectl delete deployment tic-tac-toe
echo "Existing deployment removed"
fi
# Delete the existing service if it exists
if kubectl get service tic-tac-toe-service &>/dev/null; then
kubectl delete service tic-tac-toe-service
echo "Existing service removed"
fi
kubectl apply -f deployment-service.yml
current_directory=$(pwd)
echo "Current directory is: $current_directory"
After implementation just remember to delete all the resources created
Delete ec2 instance
Delete iam role
Delete github actions secrets
For Slack Notification
name: Send a Slack Notification
if: always() # as we want it to run even if our job fails
uses: act10ns/slack@v1
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
channel: '#githubactions-eks' # your created Channel
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}