Skip to main content
Documentation

CI/CD Integration

Automate your creative workflows with Dits integration in CI/CD pipelines. Trigger builds, run tests, and deploy assets automatically.

Automated Workflows
Trigger CI/CD pipelines when creative assets change
  • Build game assets on texture updates
  • Transcode videos when raw footage is added
  • Run automated tests on code changes
  • Deploy to staging when commits are tagged
Quality Assurance
Automated checks for creative asset quality and compliance
  • Validate video codecs and formats
  • Check image resolutions and quality
  • Verify metadata completeness
  • Run automated review processes

Supported Platforms

Dits integrates with all major CI/CD platforms:

  • GitHub Actions - Native integration with repository events
  • GitLab CI - Pipeline triggers and artifact management
  • Jenkins - Jenkinsfile pipeline support
  • CircleCI - Orb-based configuration

Environment Variables

DITS_TOKEN

API token for authentication (required)

DITS_REMOTE_URL

Repository remote URL

DITS_CACHE_DIR

Override cache directory location

Platform Configuration

GitHub Actions Workflow
.github/workflows/dits.yml
name: Dits CI

on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest
    
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Install Dits CLI
        run: |
          curl -fsSL https://get.dits.io | sh
          echo "$HOME/.dits/bin" >> $GITHUB_PATH

      - name: Configure Dits
        run: |
          dits config set user.name "GitHub Actions"
          dits config set user.email "actions@github.com"
        env:
          DITS_TOKEN: ${{ secrets.DITS_TOKEN }}

      - name: Pull assets
        run: |
          dits pull origin main
          dits status

      - name: Validate assets
        run: |
          dits verify --all
          dits check-integrity

      - name: Build assets
        run: |
          # Your build commands here
          npm run build:assets

      - name: Push changes
        if: github.ref == 'refs/heads/main'
        run: |
          dits add .
          dits commit -m "CI: Build assets [${{ github.sha }}]"
          dits push origin main
        env:
          DITS_TOKEN: ${{ secrets.DITS_TOKEN }}

Webhook Triggers

Configure webhooks to trigger CI/CD pipelines when specific events occur in your Dits repository:

# Configure webhook for push events
dits webhook add \
  --event push \
  --url https://api.github.com/repos/owner/repo/dispatches \
  --secret $WEBHOOK_SECRET

# List configured webhooks
dits webhook list

# Test webhook delivery
dits webhook test <webhook-id>

Best Practices

Performance
  • Use sparse checkout for large repos
  • Cache Dits data between builds
  • Use parallel chunk downloads
  • Set appropriate cache sizes
Security
  • Store tokens in secrets manager
  • Use short-lived tokens when possible
  • Limit token scopes to required permissions
  • Enable audit logging