fix: Production workflow optimization
All checks were successful
Deploy to Staging / Build Images (push) Successful in 21s
Deploy to Staging / Deploy to Staging (push) Successful in 27s
Deploy to Staging / Verify Staging (push) Successful in 6s
Deploy to Staging / Notify Staging Ready (push) Successful in 6s
Deploy to Staging / Notify Staging Failure (push) Has been skipped

This commit is contained in:
Eric Gullickson
2025-12-30 09:44:37 -06:00
parent 20696ccbf0
commit 9c53af70dc
6 changed files with 25 additions and 4 deletions

View File

@@ -1,6 +1,9 @@
# MotoVaultPro Production Deployment Workflow # MotoVaultPro Production Deployment Workflow
# Manual trigger only - run after verifying staging # Manual trigger only - run after verifying staging
# Blue-green deployment with auto-rollback # Blue-green deployment with auto-rollback
#
# Optimization: Uses sparse checkout (scripts/ only) + shallow clone
# since all scripts run from $DEPLOY_PATH on the production server
name: Deploy to Production name: Deploy to Production
run-name: Production Deploy - ${{ inputs.image_tag || 'latest' }} run-name: Production Deploy - ${{ inputs.image_tag || 'latest' }}
@@ -81,8 +84,12 @@ jobs:
BACKEND_IMAGE: ${{ needs.validate.outputs.backend_image }} BACKEND_IMAGE: ${{ needs.validate.outputs.backend_image }}
FRONTEND_IMAGE: ${{ needs.validate.outputs.frontend_image }} FRONTEND_IMAGE: ${{ needs.validate.outputs.frontend_image }}
steps: steps:
- name: Checkout code - name: Checkout scripts only
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
sparse-checkout: scripts/
sparse-checkout-cone-mode: true
fetch-depth: 1
- name: Login to registry - name: Login to registry
run: | run: |
@@ -200,8 +207,12 @@ jobs:
needs: [validate, deploy-prod, verify-prod] needs: [validate, deploy-prod, verify-prod]
if: failure() if: failure()
steps: steps:
- name: Checkout code - name: Checkout scripts only
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
sparse-checkout: scripts/
sparse-checkout-cone-mode: true
fetch-depth: 1
- name: Execute rollback - name: Execute rollback
run: | run: |
@@ -226,8 +237,12 @@ jobs:
needs: [validate, verify-prod] needs: [validate, verify-prod]
if: success() if: success()
steps: steps:
- name: Checkout code - name: Checkout scripts only
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
sparse-checkout: scripts/
sparse-checkout-cone-mode: true
fetch-depth: 1
- name: Send success notification - name: Send success notification
run: | run: |
@@ -247,8 +262,12 @@ jobs:
needs: [validate, deploy-prod, verify-prod, rollback] needs: [validate, deploy-prod, verify-prod, rollback]
if: failure() if: failure()
steps: steps:
- name: Checkout code - name: Checkout scripts only
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
sparse-checkout: scripts/
sparse-checkout-cone-mode: true
fetch-depth: 1
- name: Send failure notification - name: Send failure notification
run: | run: |

View File

@@ -48,6 +48,7 @@
- ca-certificates - ca-certificates
- gnupg - gnupg
- jq - jq
- nodejs
state: present state: present
# ============================================ # ============================================

View File

@@ -48,6 +48,7 @@
- ca-certificates - ca-certificates
- gnupg - gnupg
- jq - jq
- nodejs
state: present state: present
# ============================================ # ============================================