Skip to content

Commit

Permalink
Add a deploy step
Browse files Browse the repository at this point in the history
  • Loading branch information
SinaKhalili committed Oct 2, 2024
1 parent e2a4890 commit d62113c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,29 @@ jobs:
docker build -f ./Dockerfile-backend -t $ECR_REPO_URI:${{github.sha}}-backend -t $ECR_REPO_URI:latest-backend .
docker push $ECR_REPO_URI:${{github.sha}}-backend
docker push $ECR_REPO_URI:latest-backend
deploy:
runs-on: ubicloud
needs: [build-frontend, build-backend]
env:
ECR_REPO_URI: 875427118836.dkr.ecr.eu-west-1.amazonaws.com/v2-risk-dashboard
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@master
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_PROD }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY_PROD }}
aws-region: "eu-west-1"

- name: Log in to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Restart deployment
run: |
aws eks update-kubeconfig --name drift-prod-cluster --region eu-west-1 --role-arn arn:aws:iam::011528263343:role/k8sAdmin
kubectl rollout restart -n mainnet-beta deployment/risk-dashboard-frontend
kubectl rollout restart -n mainnet-beta deployment/risk-dashboard-backend

0 comments on commit d62113c

Please sign in to comment.