Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Successful in 4m51s
Build and Deploy to Production / build-and-deploy (push) Successful in 4m51s
This commit is contained in:
@@ -69,8 +69,15 @@ jobs:
|
||||
- name: Deploy to Production
|
||||
run: |
|
||||
export SSHPASS="${{ secrets.SERVER_PASSWORD }}"
|
||||
|
||||
# Copy K8s manifests to server
|
||||
sshpass -e scp -o StrictHostKeyChecking=no k8s/production/frontoffice-deployment.yaml root@${{ env.K8S_SERVER }}:/tmp/frontoffice-deployment.yaml
|
||||
|
||||
# Apply manifests and restart
|
||||
sshpass -e ssh -o StrictHostKeyChecking=no root@${{ env.K8S_SERVER }} "
|
||||
kubectl set image deployment/frontoffice frontoffice=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
|
||||
kubectl rollout status deployment/frontoffice --timeout=300s
|
||||
kubectl apply -f /tmp/frontoffice-deployment.yaml &&
|
||||
kubectl rollout restart deployment/frontoffice &&
|
||||
kubectl rollout status deployment/frontoffice --timeout=300s &&
|
||||
rm -f /tmp/frontoffice-deployment.yaml
|
||||
"
|
||||
echo "✅ Deployed to Production!"
|
||||
|
||||
Reference in New Issue
Block a user