-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.04 KB
/
build-deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Build Deploy
#
# CI/CD workflow that runs on Git pushes and builds and deploys this app.
#
on:
push:
branches:
- master
env:
# the same contents as the local .env
# but with all comment lines removed: must contain only 'export VAR=val' lines
# must be eval-ed to set all env vars
ENV: ${{ secrets.ENV }}
defaults:
run:
shell: bash
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: "17.2.0"
- name: Build and push Docker image
run: |
eval $ENV
./build-docker.sh
./login-docker.sh
./push-docker.sh
- name: Deploy to k8s cluster
run: |
eval $ENV
./deploy-to-k8s-with-deployment-container.sh
- name: Get deployed endpoint hostname
# probably does not work on initial deployment due to timing
run: |
eval $ENV
./get-k8s-ingress-hostname.sh