Skip to content

Commit

Permalink
deploy to smart vault deployments (main + beta)
Browse files Browse the repository at this point in the history
  • Loading branch information
ewansheldon committed May 29, 2024
1 parent eba4a80 commit e05b0fe
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build

on:
pull_request:
branches:
- main
- beta

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- run: npm install

- run: npm run build
5 changes: 3 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ on:
push:
branches:
- main
- beta

env:
PROJECT_NAME: ${{ secrets.GKE_PROJECT }}
CLUSTER_NAME: cluster-1
CLOUDSDK_COMPUTE_ZONE: europe-west2-c
DEPLOYMENT: fork-demo
DEPLOYMENT: smart-vault
NAMESPACE: default
jobs:

Expand Down Expand Up @@ -66,7 +67,7 @@ jobs:
export IMAGE_TAG="gcr.io/${PROJECT_NAME}/$DEPLOYMENT:${GITHUB_REF##*/}.${GITHUB_SHA}"
gcloud components install gke-gcloud-auth-plugin
gcloud container clusters get-credentials cluster-1 --zone $CLOUDSDK_COMPUTE_ZONE --project $PROJECT_NAME
kubectl set image deployment/$DEPLOYMENT-deployment $DEPLOYMENT=${IMAGE_TAG} -n ${NAMESPACE}
kubectl set image deployment/$DEPLOYMENT-deployment-${GITHUB_REF##*/} $DEPLOYMENT-${GITHUB_REF##*/}=${IMAGE_TAG} -n ${NAMESPACE}
- name: Cleanup
run: |-
Expand Down

0 comments on commit e05b0fe

Please sign in to comment.