Workflows

Workflows & Pipelines

Configure automated workflows to track deployments and enable accurate DORA metrics measurement for your team.

1

GitHub Actions Workflow

The easiest way to enable DORA metrics is through a GitHub Actions workflow that uses GitHub's built-in deployment tracking.

Benefits:
  • • Automatic deployment event creation
  • • Built-in environment URL tracking
  • • Status monitoring (pending, success, failure)
  • • Seamless DORA metrics integration
.github/workflows/deploy.yml
name: Deploy to Production

on:
  push:
    branches: [main]  # Change to your main branch

permissions:
  contents: read      # Required for checkout
  deployments: write  # Required for deployment tracking

jobs:
  deploy:
    runs-on: ubuntu-latest
    
    # This creates a GitHub deployment object
    # which enables DORA metrics tracking
    environment:
      name: production
      url: https://your-app.com  # Your production URL
    
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
      
      - name: Setup your deployment environment
        run: |
          # Add your deployment setup here
          # Examples:
          # - Install dependencies
          # - Build your application
          # - Configure deployment tools
          
      - name: Deploy to production
        run: |
          # Add your deployment commands here
          # Examples:
          # - Deploy to Heroku, Vercel, AWS, etc.
          # - Run database migrations
          # - Clear caches
          # - Restart services
          
      - name: Verify deployment
        run: |
          # Optional: Add health checks
          # curl -f https://your-app.com/health
          # or other verification commands

Key Configuration Points:

branches: [main] Change to your main branch name
environment.name Set environment (production, staging, etc.)
environment.url Your actual production URL
deployments: write Essential permission for DORA tracking
2

Bitbucket Pipelines

If you're using Bitbucket, you can enable DORA metrics using Bitbucket Pipelines with built-in deployment tracking.

Benefits:
  • • Automatic deployment event creation
  • • Environment-specific deployments
  • • Status monitoring and tracking
  • • Seamless DORA metrics integration
bitbucket-pipelines.yml
image: node:18

pipelines:
  branches:
    main:
      - step:
          name: "Deploy to Production"
          deployment: production
          script:
            # Build your application
            - npm ci
            - npm run build
            
            # Deploy your application
            # Add your deployment commands here
            # Examples:
            # - Deploy to Heroku, Vercel, AWS, etc.
            # - Run database migrations
            # - Clear caches
            # - Restart services
            - echo "Deploying to production..."
            
            # Optional: Verify deployment
            - echo "Verifying deployment..."
            # curl -f https://your-app.com/health
    
    develop:
      - step:
          name: "Deploy to Test"
          deployment: test
          script:
            - npm ci
            - npm run build
            - echo "Deploying to test environment..."

Key Configuration Points:

deployment: production Set deployment environment
branches: main Configure deployment branches
step: name Descriptive deployment step name
image: node:18 Choose appropriate runtime image
3

Verify Your Setup

Once you've set up deployment tracking, verify everything is working correctly.

What to Check:

  • • Deployments appear in your dashboard after successful runs
  • • DORA metrics start calculating (may take a few deployments)
  • • Environment and status information is correct
  • • Pull requests are automatically linked to deployments
View Deployments
FEATURED

In-Depth Guide

Learn the philosophy behind simple, reliable deployments and see real-world examples of GitHub workflow structures that scale. Includes YAML gotchas, deployment strategies, and practical tips.

Read: Structuring GitHub Workflows

GitHub Documentation

Learn more about GitHub's deployment features and best practices.

View GitHub Docs

API Integration

For advanced setups, use GitHub's REST API to create deployment events.

API Reference

Bitbucket Documentation

Learn more about Bitbucket Pipelines deployment features and configuration options.

View Bitbucket Docs