fix: Update configs for Production deployment
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 5s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
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 5s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
This commit is contained in:
@@ -84,22 +84,27 @@ jobs:
|
||||
BACKEND_IMAGE: ${{ needs.validate.outputs.backend_image }}
|
||||
FRONTEND_IMAGE: ${{ needs.validate.outputs.frontend_image }}
|
||||
steps:
|
||||
- name: Checkout scripts only
|
||||
- name: Checkout scripts and config
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: scripts/
|
||||
sparse-checkout: |
|
||||
scripts/
|
||||
config/
|
||||
sparse-checkout-cone-mode: true
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Sync config to deploy path
|
||||
run: |
|
||||
rsync -av --delete "$GITHUB_WORKSPACE/config/" "$DEPLOY_PATH/config/"
|
||||
|
||||
- name: Login to registry
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login -u "${{ secrets.REGISTRY_USER }}" --password-stdin "$REGISTRY"
|
||||
|
||||
- name: Inject secrets
|
||||
run: |
|
||||
cd "$DEPLOY_PATH"
|
||||
chmod +x scripts/inject-secrets.sh
|
||||
./scripts/inject-secrets.sh
|
||||
chmod +x "$GITHUB_WORKSPACE/scripts/inject-secrets.sh"
|
||||
"$GITHUB_WORKSPACE/scripts/inject-secrets.sh"
|
||||
env:
|
||||
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
|
||||
AUTH0_CLIENT_SECRET: ${{ secrets.AUTH0_CLIENT_SECRET }}
|
||||
@@ -135,9 +140,8 @@ jobs:
|
||||
|
||||
- name: Run health check
|
||||
run: |
|
||||
cd "$DEPLOY_PATH"
|
||||
chmod +x scripts/ci/health-check.sh
|
||||
./scripts/ci/health-check.sh $TARGET_STACK $HEALTH_CHECK_TIMEOUT
|
||||
chmod +x "$GITHUB_WORKSPACE/scripts/ci/health-check.sh"
|
||||
"$GITHUB_WORKSPACE/scripts/ci/health-check.sh" $TARGET_STACK $HEALTH_CHECK_TIMEOUT
|
||||
|
||||
- name: Start Traefik
|
||||
run: |
|
||||
@@ -157,9 +161,8 @@ jobs:
|
||||
|
||||
- name: Switch traffic
|
||||
run: |
|
||||
cd "$DEPLOY_PATH"
|
||||
chmod +x scripts/ci/switch-traffic.sh
|
||||
./scripts/ci/switch-traffic.sh $TARGET_STACK instant
|
||||
chmod +x "$GITHUB_WORKSPACE/scripts/ci/switch-traffic.sh"
|
||||
"$GITHUB_WORKSPACE/scripts/ci/switch-traffic.sh" $TARGET_STACK instant
|
||||
|
||||
- name: Update deployment state
|
||||
run: |
|
||||
@@ -254,17 +257,10 @@ jobs:
|
||||
sparse-checkout-cone-mode: true
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Checkout config
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: config/
|
||||
sparse-checkout-cone-mode: true
|
||||
|
||||
- name: Execute rollback
|
||||
run: |
|
||||
cd "$DEPLOY_PATH"
|
||||
chmod +x scripts/ci/auto-rollback.sh
|
||||
./scripts/ci/auto-rollback.sh "Production verification failed - automatic rollback"
|
||||
chmod +x "$GITHUB_WORKSPACE/scripts/ci/auto-rollback.sh"
|
||||
"$GITHUB_WORKSPACE/scripts/ci/auto-rollback.sh" "Production verification failed - automatic rollback"
|
||||
|
||||
- name: Update state
|
||||
run: |
|
||||
@@ -292,9 +288,8 @@ jobs:
|
||||
|
||||
- name: Send success notification
|
||||
run: |
|
||||
cd "$DEPLOY_PATH"
|
||||
chmod +x scripts/ci/notify.sh
|
||||
./scripts/ci/notify.sh success "Production deployment successful - ${{ inputs.image_tag }} is now live" ${{ inputs.image_tag }}
|
||||
chmod +x "$GITHUB_WORKSPACE/scripts/ci/notify.sh"
|
||||
"$GITHUB_WORKSPACE/scripts/ci/notify.sh" success "Production deployment successful - ${{ inputs.image_tag }} is now live" ${{ inputs.image_tag }}
|
||||
env:
|
||||
DEPLOY_NOTIFY_EMAIL: ${{ vars.DEPLOY_NOTIFY_EMAIL }}
|
||||
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}
|
||||
@@ -317,9 +312,8 @@ jobs:
|
||||
|
||||
- name: Send failure notification
|
||||
run: |
|
||||
cd "$DEPLOY_PATH"
|
||||
chmod +x scripts/ci/notify.sh
|
||||
./scripts/ci/notify.sh failure "Production deployment failed for ${{ inputs.image_tag }}" ${{ inputs.image_tag }}
|
||||
chmod +x "$GITHUB_WORKSPACE/scripts/ci/notify.sh"
|
||||
"$GITHUB_WORKSPACE/scripts/ci/notify.sh" failure "Production deployment failed for ${{ inputs.image_tag }}" ${{ inputs.image_tag }}
|
||||
env:
|
||||
DEPLOY_NOTIFY_EMAIL: ${{ vars.DEPLOY_NOTIFY_EMAIL }}
|
||||
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}
|
||||
|
||||
Reference in New Issue
Block a user