-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Adam Paulen
committed
Dec 18, 2024
1 parent
4406455
commit 055e21b
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters