Skip to content

Commit 40e083a

Browse files
committed
fix: removing prod deployment from github workflow
1 parent ff33f89 commit 40e083a

1 file changed

Lines changed: 2 additions & 45 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
name : Build and Deploy
1+
name : Build and Deploy to Dev
22

33
on:
44
push:
5-
branches: [development,main]
5+
branches: [development]
66

77
env:
88
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
99
GKE_CLUSTER_DEV: nmrxiv-dev
10-
GKE_CLUSTER_PROD: nmrxiv-prod
1110
GKE_ZONE: europe-west3-a
1211
DEPLOYMENT_NAME: nmrxiv-nmrium
1312
REPOSITORY_NAME_DEV: nmrxiv-dev
14-
REPOSITORY_NAME_PROD: nmrxiv-prod
1513
IMAGE: nmrium
1614

1715
jobs:
@@ -71,44 +69,3 @@ jobs:
7169
kubectl rollout restart deployment/$DEPLOYMENT_NAME
7270
kubectl rollout status deployment/$DEPLOYMENT_NAME --timeout=300s
7371
kubectl get services -o wide
74-
75-
setup-build-publish-deploy-prod:
76-
name: deploy to prod
77-
if: github.ref == 'refs/heads/main'
78-
runs-on: ubuntu-latest
79-
needs: lint
80-
steps:
81-
- name: Checkout
82-
uses: actions/checkout@v2
83-
84-
# Setup gcloud CLI
85-
- uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7
86-
with:
87-
service_account_key: ${{ secrets.GKE_SA_KEY }}
88-
project_id: ${{ secrets.GKE_PROJECT }}
89-
90-
# Configure docker to use the gcloud command-line tool as a credential helper
91-
- run: |-
92-
gcloud auth configure-docker europe-west3-docker.pkg.dev
93-
# Get the GKE credentials so we can deploy to the cluster
94-
- uses: google-github-actions/get-gke-credentials@v0.3.0
95-
with:
96-
cluster_name: ${{ env.GKE_CLUSTER_PROD }}
97-
location: ${{ env.GKE_ZONE }}
98-
credentials: ${{ secrets.GKE_SA_KEY }}
99-
100-
# Build the Docker image
101-
- name: Build Image
102-
run: |-
103-
docker build -f Dockerfile.prod --tag europe-west3-docker.pkg.dev/$PROJECT_ID/$REPOSITORY_NAME_PROD/$IMAGE:latest .
104-
# Push the Docker image to Google Artifact Registry
105-
- name: Publish Image to Google Artifact Registry
106-
run: |-
107-
docker push "europe-west3-docker.pkg.dev/$PROJECT_ID/$REPOSITORY_NAME_PROD/$IMAGE:latest"
108-
109-
# Deploy the latest Docker image to the GKE cluster
110-
- name: Deploy
111-
run: |-
112-
kubectl rollout restart deployment/$DEPLOYMENT_NAME
113-
kubectl rollout status deployment/$DEPLOYMENT_NAME --timeout=300s
114-
kubectl get services -o wide

0 commit comments

Comments
 (0)