Cased works with GitHub Actions’ workflows to deploy code. A workflow file is a YAML file that defines the steps in a deployment process.

When you deploy with Cased, we send two variables to the workflow:

  • branch - The branch to deploy, e.g. main or feature/my-branch
  • target_name - The target to deploy to, e.g. production or staging

You can use these variables in your workflow to deploy your code.

Here’s an simple workflow using the variables above:

name: deploy
on:
  workflow_dispatch:
    inputs:
      branch:
        required: true
      target_name:
        required: true

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Deploy to target
        run: |
          echo "Deploying to ${{ inputs.target }} from ${{ inputs.branch }}"