# CI/CD on Northflank

Northflank enables you to manage your application delivery from development, through testing, to production.

You can automate builds and deployments using CI/CD in individual services, or use environments and workflows to configure complex release processes covering many resources.

You can also learn more in the guide on [releasing for production](/v1/application/production-workloads/release-for-production).

## Continuous integration and delivery

Continuous integration (CI) allows you to automatically build code when a commit is pushed to your Git repository. Continuous delivery (CD) automatically deploys new builds in any environment.

You can configure rules in services and jobs to manage your development workflows and releases.

CI/CD on Northflank can be used to set up simple but powerful release flows. You can enable CI/CD in a single combined service to automatically build and deploy from one repository. You could also use CI/CD with a build service to build development, release, and production branches and deploy to different deployment services.

- [Manage CI/CD: Configure continuous integration and continuous delivery on your Northflank services.](/v1/application/release/manage-ci-cd)

## Release with environments

Environments represent deployment targets in your release process, such as development, staging, and production. Each environment is a separate stage where you manage builds, services, and resources. Environments keep your deployments organized and allow you to maintain clear separation between different stages of your application lifecycle.

Within each environment, you define workflows that automate your release tasks. A workflow is a series of automated steps that orchestrate building, testing, and deploying your code to that specific environment.

### Workflows

Workflows are templates for specific environments that automate release tasks, such as backing up databases, triggering builds, running jobs, and deploying services.

You can make each step in a workflow conditional so that if a step fails, the rest of the workflow will not continue. You can also quickly roll back to a previous deployment.

### Triggering workflows

Workflows can be run manually, or you can configure Git or cron triggers to start workflow runs automatically.

- [Configure a workflow: Learn how to use the visual editor or code to configure a workflow.](/v1/application/release/configure-workflows)
- [Run and manage workflows: Run and manage workflows for different environments.](/v1/application/release/run-and-manage-workflows)
- [Workflows and preview blueprints within templates: Create and manage environments with workflow and preview blueprint templates within Northflank templates.](/v1/application/infrastructure-as-code/write-a-template#include-workflows-and-preview-blueprints)

## Run database migrations

You can run database migrations manually or automate the process as part of a workflow.

- [Run migrations: Run database migrations and update your deployments simultaneously when you update your schema.](/v1/application/release/run-migrations)

## Ephemeral preview environments

You can define a preview blueprint to create ephemeral environments to preview Git branches or pull requests.

Preview environments can be created automatically using Git or cron triggers, and deleted in one action.

- [Set up preview blueprints: Create preview blueprints to automatically create preview environments for your branches and pull requests.](/v1/application/release/set-up-preview-blueprints)
- [Manage preview blueprints: Manage active previews, manually create test environments, and configure automatic cleanup.](/v1/application/release/manage-preview-blueprints)
- [Workflows and preview blueprints within templates: Create and manage environments with workflow and preview blueprint templates within Northflank templates.](/v1/application/infrastructure-as-code/write-a-template#include-workflows-and-preview-blueprints)

## Release using Git

You can store workflows as JSON in a Git repository with bidirectional sync, so that when you commit changes to your workflow template it will update in Northflank, and vice versa.

You can also trigger a workflow using a webhook in a GitHub action.

- [GitOps on Northflank: Use templates and workflows in a Git repository to trigger changes to your config and resources.](/v1/application/infrastructure-as-code/gitops-on-northflank)
- [Use Git Actions on Northflank: Create workflows and publish GitHub Actions that interact with Northflank.](/v1/application/infrastructure-as-code/use-github-actions-with-northflank)
