Skip to content
Crow CI
Codeberg

Deployment

Deployments are manually triggered pipeline runs for deploying successful builds to specific environments like staging or production.

Deployments must be enabled in the repository settings:

  1. Open repository settings

    Go to Repository SettingsGeneral

  2. Enable deployments

    Check the Deployments option

Once enabled, a Deploy button appears on finished pipelines.

Only repository admins can enable or disable deployments in the repository settings. Admin permission is synced from the forge (GitHub, GitLab, Gitea, etc.).

By default, any user with push permission to the repository can trigger deployments.

For stricter control, you can restrict deployments to members of a specific forge team:

  1. Open repository settings

    Go to Repository SettingsGeneral

  2. Enable deployments

    Check the Deployments option

  3. Set the team restriction

    In the Restrict to Team field, enter the team name (e.g., crowci-deploy-team)

When configured, only members of the specified team can trigger deployments. The team membership is verified against the forge at the time of deployment.

Deploy Button
Deploy Button

Click the Deploy button to open the deployment dialog:

Deployment Popup
Deployment Popup
FieldRequiredDescription
EnvironmentYesTarget environment (e.g., production, staging)
TaskNoSecondary filter to narrow down deployment jobs

Use the deployment event in your workflow’s when block to control which steps run during deployments.

when:
event: deployment
environment: production
when:
event: deployment
environment: production
task: migrate-db

Both environment and task support glob patterns:

when:
event: deployment
environment: prod-*
task: deploy-*

For complex filtering, use include/exclude lists:

when:
event: deployment
environment:
include: [production, staging]
exclude: [production-test]