Skip to content

Commit

Permalink
deploy to staging
Browse files Browse the repository at this point in the history
  • Loading branch information
M7mdisk committed Feb 13, 2025
1 parent 74cec1d commit 9c38312
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,28 @@ jobs:
runs-on: [self-hosted, self-hosted-linux-amd64-jammy-private-endpoint-medium]
needs: build-and-push
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo snap install kubectl --classic
sudo snap install konf
- name: Configure kubectl
run: |
echo "${{ secrets.KUBE_CONFIG }}" > kubeconfig
export KUBECONFIG=kubeconfig
- name: Deploy application
run: |
epoch_time=$(date +%s)
image_tag="${epoch_time}-${GITHUB_SHA::7}"
image_name="${{ env.IMAGE_NAME }}:${image_tag}"
echo "Deploying image: $image_name"
konf production konf/site.yaml --tag $image_tag
konf staging konf/site.yaml --tag $image_tag | kubectl apply -f -
kubectl rollout status deployment jaas-ai --namespace=staging
echo "Deployment successful!"
- name: Clean up
run: |
rm kubeconfig

0 comments on commit 9c38312

Please sign in to comment.