feat: fully functional tts service - merge conflicts resolved #1
This file contains hidden or 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
| name: π Deploy to Kubernetes | ||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| workflow_dispatch: | ||
| env: | ||
| KUBECONFIG: ${{ secrets.KUBECONFIG }} | ||
| jobs: | ||
| deploy: | ||
|
Check failure on line 12 in .github/workflows/deploy-k8s.yml
|
||
| name: π Deploy to Kubernetes | ||
| runs-on: ubuntu-latest | ||
| needs: [build-and-push-ghcr] | ||
| steps: | ||
| - name: π₯ Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: π Configure AWS credentials | ||
| uses: aws-actions/configure-aws-credentials@v4 | ||
| with: | ||
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
| aws-region: us-east-1 | ||
| - name: π§ Configure kubectl | ||
| run: | | ||
| aws eks update-kubeconfig --name flexfit-cluster-production --region us-east-1 | ||
| - name: π¦ Install Helm | ||
| run: | | ||
| curl https://get.helm.sh/helm-v3.12.0-linux-amd64.tar.gz | tar xz | ||
| sudo mv linux-amd64/helm /usr/local/bin/helm | ||
| - name: π Deploy to Kubernetes | ||
| env: | ||
| GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} | ||
| CHAIR_API_KEY: ${{ secrets.CHAIR_API_KEY }} | ||
| run: | | ||
| # Create namespace if it doesn't exist | ||
| kubectl create namespace flexfit --dry-run=client -o yaml | kubectl apply -f - | ||
| # Create Google credentials secret | ||
| kubectl create secret generic flexfit-google-credentials \ | ||
| --from-literal=google-credentials.json="$GOOGLE_CREDENTIALS" \ | ||
| --namespace flexfit --dry-run=client -o yaml | kubectl apply -f - | ||
| # Deploy using Helm | ||
| helm upgrade --install flexfit ./helm/flexfit \ | ||
| --namespace flexfit \ | ||
| --set googleCredentials="$GOOGLE_CREDENTIALS" \ | ||
| --set chairApiKey="$CHAIR_API_KEY" \ | ||
| --set global.imageTag="${{ github.sha }}" \ | ||
| --wait --timeout=10m | ||
| - name: π₯ Health Check | ||
| run: | | ||
| echo "Waiting for services to be ready..." | ||
| kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=flexfit --namespace flexfit --timeout=300s | ||
| echo "Checking service endpoints..." | ||
| kubectl get services -n flexfit | ||
| kubectl get pods -n flexfit | ||
| - name: π Deployment Status | ||
| run: | | ||
| echo "π Deployment completed successfully!" | ||
| echo "Services deployed:" | ||
| kubectl get services -n flexfit | ||
| echo "" | ||
| echo "Pods status:" | ||
| kubectl get pods -n flexfit | ||