Skip to main content
On this page
Updated 1 min read

Integrating GitHub Workflows

Integrating GitHub Workflows

Adapto CMS GitHub Workflow Integration dispatches a workflow_dispatch event to a GitHub Actions workflow in any repository your Personal Access Token has access to. Use it to trigger deployments, static site rebuilds, or any automated process that lives in a GitHub Actions workflow.


Configuration

In the backoffice, go to Developer Tools → GitHub Workflow Integration and create a new integration with:

  • Label — an internal name
  • Personal Access Token (PAT) — a GitHub PAT with repo and workflow scopes
  • Repository — in owner/repo format (e.g. acme/my-website)
  • Workflow File — the filename of the workflow to dispatch (e.g. deploy.yml)
  • Git Reference — the branch, tag, or commit SHA to run the workflow on (e.g. main)

The PAT is stored securely and stripped from all API responses. When editing an integration, leaving the PAT field empty preserves the existing token — fill it in only to rotate it.


Setting up the workflow

The target workflow must declare a workflow_dispatch trigger. Define the inputs your workflow expects, and they are available as ${{ inputs.key }} throughout the job:

# .github/workflows/deploy.yml
name: Deploy

on:
  workflow_dispatch:
    inputs:
      environment:
        description: Target environment
        required: false
        default: production
      notify:
        description: Send Slack notification
        required: false
        default: 'true'

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Deploy to ${{ inputs.environment }}
        run: ./scripts/deploy.sh --env ${{ inputs.environment }}

      - name: Notify
        if: inputs.notify == 'true'
        run: ./scripts/notify.sh "Deployed to ${{ inputs.environment }}"

Triggering and inputs

From the integration list, use the Trigger button to dispatch the workflow immediately. The trigger dialog accepts typed key-value pairs (string, number, boolean) that are passed as the inputs object to the GitHub dispatch API. Input names must match the keys declared in the workflow's workflow_dispatch.inputs block — undeclared inputs are ignored by GitHub Actions.

A successful dispatch returns HTTP 204 from the GitHub API. The integration does not poll for workflow run status — monitor the run in the Actions tab of your repository.