-
Notifications
You must be signed in to change notification settings - Fork 10
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
1 parent
39ee0aa
commit acb211a
Showing
4 changed files
with
105 additions
and
23 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,25 @@ | ||
name: Build Demo App Video | ||
run-name: Build Demo App Video On Pull Request | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
steps: | ||
- name: 💾 Checking out the repository | ||
uses: actions/checkout@v4 | ||
- name: ⚙️ Setting up the MonkJs project | ||
uses: ./.github/actions/monkjs-set-up | ||
with: | ||
build-env: production | ||
- name: 📱 Building the demo app video | ||
run: cd apps/demo-app-video && yarn build:staging |
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,62 @@ | ||
name: Deploy Demo App Video | ||
run-name: Deploy Demo App Video To Staging After Merge | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
steps: | ||
- name: 💾 Checking out the repository | ||
uses: actions/checkout@v4 | ||
- name: ⚙️ Setting up the MonkJs project | ||
uses: ./.github/actions/monkjs-set-up | ||
with: | ||
build-env: production | ||
- name: 📱 Building the demo app video | ||
run: cd apps/demo-app-video && yarn build:staging | ||
- name: 📦 Uploading the artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: build-demo-app-video-staging | ||
path: apps/demo-app-video/build | ||
if-no-files-found: error | ||
|
||
deploy: | ||
name: Deploy | ||
environment: staging | ||
needs: | ||
- build | ||
container: | ||
image: dtzar/helm-kubectl:3.14.2 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🔐 Authenticating to Google Cloud | ||
uses: google-github-actions/[email protected] | ||
with: | ||
credentials_json: "${{ secrets.GKE_SA_KEY }}" | ||
- name: 🔐 Obtaining GKE credentials | ||
uses: google-github-actions/[email protected] | ||
with: | ||
cluster_name: ${{ secrets.GKE_CLUSTER }} | ||
location: ${{ secrets.GKE_ZONE }} | ||
project_id: ${{ secrets.GKE_PROJECT }} | ||
- name: 📦 Downloading the artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: build-demo-app-video-staging | ||
path: demo-video | ||
- name: 🧹 Cleaning up previous build | ||
run: |- | ||
kubectl -n poc exec -it $(kubectl get pods -n poc -l app.kubernetes.io/instance=poc-spa --no-headers | awk '{print $1}') -- rm -rf demo-video | ||
- name: 🌐 Deploying app | ||
run: |- | ||
kubectl -n poc cp demo-video poc/$(kubectl get pods -n poc -l app.kubernetes.io/instance=poc-spa --no-headers | awk '{print $1}'):/app/ |
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
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