Skip to content

Commit 5eeaa1c

Browse files
committed
fix: staging restart
1 parent fcf9b2f commit 5eeaa1c

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/staging.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: staging cicd
1+
name: CI/CD for Staging
22

33
on:
44
push:
@@ -25,6 +25,21 @@ jobs:
2525
env:
2626
NETRC_FILE_CONTENT: ${{ secrets.NETRC_FILE_CONTENT }}
2727

28+
- name: Install kubectl
29+
run: |
30+
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
31+
chmod +x ./kubectl
32+
sudo mv ./kubectl /usr/local/bin/kubectl
33+
34+
- name: Azure Login
35+
uses: azure/login@v1
36+
with:
37+
creds: ${{ secrets.AZURE_CREDENTIALS }}
38+
39+
- name: Set up AKS context
40+
run: |
41+
az aks get-credentials --resource-group lititRG --name litit-aks
42+
2843
- name: Authenticate with Azure ACR
2944
uses: azure/docker-login@v1
3045
with:
@@ -44,6 +59,10 @@ jobs:
4459
env:
4560
ACCESS_TOKEN_STAGING: ${{ secrets.ACCESS_TOKEN_STAGING }}
4661

62+
- name: Restart Kubernetes deployment
63+
run: |
64+
kubectl rollout restart deployment content -n dev
65+
4766
- name: Send Slack notification
4867
run: |
4968
# Add your Slack notification logic here

0 commit comments

Comments
 (0)