Integration guides

GitHub Actions workflow

Set up DeployState with GitHub Actions

Store the private hook URL in GitHub Actions secrets, then send a start event before deploy and a completion or failure event after it settles.

01 / Configure the platform

Put the hook beside the deployment work.

Find Repository → Settings → Secrets and variables → Actions. The exact commands stay in the tool you already trust; DeployState only receives the lifecycle signal before and after it runs.

  1. 01

    Copy the step hook

    In DeployState, open the sequence step that represents this workflow and copy its private base URL.

  2. 02

    Create an encrypted Actions secret

    Add DEPLOYSTATE_HOOK_URL as a repository or environment secret. Never put the private URL directly in workflow YAML.

  3. 03

    Bracket the deployment job

    Run /start before deploy. Add a final always() step that chooses /complete or /fail from the job result.

02 / YAML example

A single private base URL, three possible states.

Start the signal immediately before the deploy job or deploy command. Use always() to report the final result even when the deployment command fails.

YAMLDEPLOYSTATE_HOOK_URL
- name: Start DeployState run
  run: curl --fail --silent --show-error -X POST "${{ secrets.DEPLOYSTATE_HOOK_URL }}/start"

- name: Deploy
  run: ./scripts/deploy-production.sh

- name: Finish DeployState run
  if: always()
  run: |
    if [ "${{ job.status }}" = "success" ]; then
      curl --fail --silent --show-error -X POST "${{ secrets.DEPLOYSTATE_HOOK_URL }}/complete"
    else
      curl --fail --silent --show-error -X POST \
        -H 'Content-Type: application/json' \
        --data '{"message":"GitHub Actions deployment failed"}' \
        "${{ secrets.DEPLOYSTATE_HOOK_URL }}/fail"
    fi

Set DEPLOYSTATE_HOOK_URL to the private URL copied from a step, for example https://your-deploystate-url/api/v1/hooks/{step-token}. Append /start, /complete, or /fail exactly as shown.

If you choose a readable endpoint, store its URL and token separately: DEPLOYSTATE_HOOK_URL=https://your-deploystate-url/api/v1/production/deploy and DEPLOYSTATE_HOOK_KEY={step-token}, then add -H "X-DeployState-Key: $DEPLOYSTATE_HOOK_KEY" to each curl call.

03 / Protect the signal

Keep the credential in the platform’s secret store.

  • Do not paste a private hook into source control, an issue, or build output.
  • For a readable endpoint, keep DEPLOYSTATE_HOOK_KEY private even though the URL itself is safe to read.
  • Give each deploy concern its own step so one integration never needs another integration’s credential.
  • Rotate the hook from the DeployState step editor if it is exposed or no longer needed.

Ready to test

The next deployment will show up on its own.

Start free