Skip to content

ci: create deploy pipeline#3

Merged
Malanius merged 4 commits intomainfrom
feature/deploy-pipeline
Jun 8, 2025
Merged

ci: create deploy pipeline#3
Malanius merged 4 commits intomainfrom
feature/deploy-pipeline

Conversation

@Malanius
Copy link
Owner

@Malanius Malanius commented Jun 8, 2025

This pull request introduces a GitHub Actions-based deployment pipeline for AWS CDK, along with supporting changes to the infrastructure code and development environment configuration. The most important changes include adding workflows for deployment, creating a new GitHubDeploy stack for permissions management, and updating the application stage to conditionally include the deployment stack in production.

Deployment Pipeline Setup:

  • .github/workflows/deploy.yaml: Added a new GitHub Actions workflow to automate the deployment of CDK stacks. This includes a diff job to preview changes and a deploy job to apply them to the production environment.
  • .github/workflows/prepare.yaml: Added a reusable composite action to set up the Node.js environment, install pnpm, and install project dependencies.

Infrastructure Code Updates:

  • src/deploy/github-deploy.stack.ts: Introduced a new GitHubDeploy stack to manage AWS IAM roles and permissions required for GitHub Actions to deploy CDK stacks. This includes policies for CloudFormation, S3, ECR, and SSM.
  • src/app-stage.ts: Updated the AppStage class to include the GitHubDeploy stack in the production environment. Added dependencies between stacks to ensure proper deployment order. [1] [2]

Development Environment Configuration:

  • .vscode/settings.json: Configured Prettier as the default formatter for GitHub Actions workflow files to ensure consistent formatting.

@Malanius Malanius requested a review from Copilot June 8, 2025 10:51
@Malanius Malanius self-assigned this Jun 8, 2025
@Malanius Malanius added the enhancement New feature or request label Jun 8, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds a GitHub Actions deployment pipeline that leverages AWS CDK along with infrastructure code updates to support a new GitHubDeploy stack for managing deployment permissions.

  • Introduces GitHub Actions workflows for diffing and deploying CDK stacks.
  • Adds a new GitHubDeploy stack for IAM role and policy setup for GitHub Actions.
  • Updates the AppStage to conditionally include the GitHubDeploy stack in production and sets up stack dependencies.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/deploy/github-deploy.stack.ts Adds GitHubDeploy stack with IAM roles and policies for CDK deployments.
src/app-stage.ts Updates AppStage to instantiate GitHubDeploy conditionally and establishes dependencies.
.vscode/settings.json Configures the default formatter for GitHub Actions workflow files.
.github/workflows/prepare.yaml Provides a composite action to set up the Node.js environment and install dependencies.
.github/workflows/deploy.yaml Implements workflows for diffing and deploying the CDK stacks.
Comments suppressed due to low confidence (1)

src/app-stage.ts:17

  • If core or related stacks depend on resources from GitHubDeploy, consider explicitly adding dependencies (using addDependency) between them to enforce the correct deployment order.
if (appStage === 'prod') {

@Malanius Malanius merged commit 534d6b6 into main Jun 8, 2025
@Malanius Malanius deleted the feature/deploy-pipeline branch June 8, 2025 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants