File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed
Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change 2323 description : " Helm chart override values (yaml)"
2424 required : true
2525 type : string
26+ deploy_staff :
27+ description : " Deploy staff dashboard (prod only)"
28+ required : true
29+ type : boolean
30+ default : false
2631
2732jobs :
2833 deploy :
@@ -58,10 +63,35 @@ jobs:
5863 kubectl rollout restart deployment ${{ inputs.name }}-frontend
5964 fi
6065
66+ # Deploy staff dashboard if requested
67+ if [ "${{ inputs.deploy_staff }}" = "true" ]; then
68+ echo "Deploying staff dashboard..."
69+
70+ # Check if staff helm chart exists
71+ helm status ${{ inputs.name }}-staff &>/dev/null && staff_status=true || staff_status=false
72+
73+ # Upgrade staff helm chart, or install if not exists
74+ helm upgrade ${{ inputs.name }}-staff oci://registry-1.docker.io/octoberkeleytime/bt-staff \
75+ --install \
76+ --version=${{ inputs.version }} \
77+ --namespace=bt
78+
79+ # Restart deployment if helm chart existed
80+ if [ $staff_status = true ]; then
81+ kubectl rollout restart deployment ${{ inputs.name }}-staff-frontend
82+ fi
83+
84+ # Check container status
85+ kubectl rollout status --timeout=300s deployment ${{ inputs.name }}-staff-frontend
86+ fi
87+
6188 # Check container status
6289 kubectl rollout status --timeout=300s deployment ${{ inputs.name }}-backend
6390 kubectl rollout status --timeout=300s deployment ${{ inputs.name }}-frontend
6491
6592 - name : Output Summary
6693 run : |
6794 echo "# :white_check_mark: Deployment available at [${{ inputs.host }}](https://${{ inputs.host }})." >> $GITHUB_STEP_SUMMARY
95+ if [ "${{ inputs.deploy_staff }}" = "true" ]; then
96+ echo "# :white_check_mark: Staff dashboard available at [staff.berkeleytime.com](https://staff.berkeleytime.com)." >> $GITHUB_STEP_SUMMARY
97+ fi
Original file line number Diff line number Diff line change 11name : " CD: Deploy to Production"
2- run-name : " Deployed `${{ github.sha }}`"
2+ run-name : " Deployed `${{ github.sha }}`${{ inputs.deploy_staff && ' with staff dashboard' || '' }} "
33
44concurrency : production
55
66on :
77 workflow_dispatch :
8+ inputs :
9+ deploy_staff :
10+ description : " Deploy staff dashboard"
11+ required : true
12+ type : boolean
13+ default : false
814
915jobs :
1016 branch-check :
3642 values : |
3743 host: berkeleytime.com
3844 host : berkeleytime.com
45+ deploy_staff : ${{ inputs.deploy_staff }}
3946 secrets : inherit
You can’t perform that action at this time.
0 commit comments