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