-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (43 loc) · 1.4 KB
/
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
47
48
49
50
51
52
53
54
55
name: Build and Deploy to Kubernetes
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Dependencies
run: npm install
- name: Build Application
run: npm run build
- name: Set Up kubectl
uses: azure/setup-kubectl@v3
with:
version: 'latest'
- name: Create ConfigMaps
run: |
NAMESPACE="jupyterhub-dev-ns"
BASE_DIR="./dist"
create_configmap() {
local name=$1
local path=$2
kubectl create configmap $name --from-file=$path --dry-run=client -o yaml > $name.yaml
}
create_configmap "static-files" "$BASE_DIR"
create_configmap "static-files-js" "$BASE_DIR/static/custom-js"
create_configmap "static-files-css" "$BASE_DIR/static/custom-css"
create_configmap "static-files-woff" "$BASE_DIR/static/woff"
create_configmap "static-files-woff2" "$BASE_DIR/static/woff2"
create_configmap "static-files-images" "$BASE_DIR/static"
- name: Upload ConfigMap YAML Files
uses: actions/upload-artifact@v3
with:
name: configmap-yamls
path: ./*.yaml