Skip to content

.github/workflows/deploy.yml #23

.github/workflows/deploy.yml

.github/workflows/deploy.yml #23

Workflow file for this run

name: Deploy to AKS
on:
# push:
# branches:
# - main
permissions:
id-token: write
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Azure Login
run: |
az login --service-principal -u ${{ secrets.ARM_CLIENT_ID }} -p ${{ secrets.ARM_CLIENT_SECRET }} --tenant ${{ secrets.ARM_TENANT_ID }}
- name: Start AKS Cluster
run: |
az aks start --name myAKSCluster --resource-group Demo-rg
az aks get-credentials --resource-group Demo-rg --name myAKSCluster
- name: Deploy to AKS
run: |
kubectl apply -f manifestfile.yml
working-directory: ./myapp
- name: Port Forwarding
run: |
kubectl port-forward svc/my-app 5070:5070 &
- name: Test Application
run: |
curl http://localhost:5070/products