diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec59adc95..2d7437167 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: with: workflow_call: true - deploy: + deploy-apps: needs: [lint, test] strategy: matrix: @@ -31,6 +31,6 @@ jobs: secrets: inherit deploy-web: - # needs: [lint, test] TODO: uncomment + needs: [lint, test] uses: ./.github/workflows/deploy-web.yml secrets: inherit diff --git a/.github/workflows/deploy-web.yml b/.github/workflows/deploy-web.yml index 636ccaab9..7460e23b1 100644 --- a/.github/workflows/deploy-web.yml +++ b/.github/workflows/deploy-web.yml @@ -34,8 +34,8 @@ jobs: echo "changes_detected=false" >> $GITHUB_OUTPUT fi deployment: - # TODO: uncomment - # needs: check_changes + needs: check_changes + if: needs.check_changes.outputs.changes_detected == 'true' runs-on: ubuntu-latest steps: - name: Checkout code @@ -81,14 +81,13 @@ jobs: aws-region: eu-central-1 role-skip-session-tagging: true - # TODO: uncomment - # - name: Build & push docker images - # working-directory: apps/infra - # run: | - # echo "Deploying Pulumi stack: docker-production-web" - # pulumi up --stack docker-production-web --yes - # env: - # PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }} + - name: Build & push docker images + working-directory: apps/infra + run: | + echo "Deploying Pulumi stack: docker-production-web" + pulumi up --stack docker-production-web --yes + env: + PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }} - name: Deploy with CodeDeploy working-directory: apps/web @@ -100,3 +99,7 @@ jobs: --application-name LatitudeLLMCodeDeployApp \ --deployment-group-name LatitudeLLMDeploymentGroup \ --revision "{\"revisionType\": \"AppSpecContent\", \"appSpecContent\": {\"content\": $appspec_content}}" + +concurrency: + group: production-web + cancel-in-progress: false diff --git a/apps/infra/src/app/production/web.ts b/apps/infra/src/app/production/web.ts index e811144d3..fcabefee1 100644 --- a/apps/infra/src/app/production/web.ts +++ b/apps/infra/src/app/production/web.ts @@ -210,7 +210,7 @@ new aws.codedeploy.DeploymentGroup('LatitudeLLMDeploymentGroup', { }, terminateBlueInstancesOnDeploymentSuccess: { action: 'TERMINATE', - terminationWaitTimeInMinutes: 5, + terminationWaitTimeInMinutes: 1, }, }, deploymentStyle: {