Last updated on 8th July 2026

Automation and Scheduled Deployments

The DeployHQ CLI lets you configure automated deployment triggers, scheduled deployments, deployment checks, notification integrations, and network agents.

Automatic Deployments

Automatic deployments trigger a deployment whenever changes are pushed to your repository.

Listing Auto-Deploy Configuration

dhq auto-deploys list -p my-app

Enabling Auto-Deploy for a Server

dhq auto-deploys enable -p my-app --server production

Disabling Auto-Deploy

dhq auto-deploys enable -p my-app --server production --disable

Scheduled Deployments

Scheduled deployments run on a recurring schedule (e.g., deploy to staging every night).

Listing Scheduled Deployments

dhq scheduled-deploys list -p my-app

Viewing a Scheduled Deployment

dhq scheduled-deploys show <id> -p my-app

Creating a Scheduled Deployment

dhq scheduled-deploys create -p my-app \
  --server staging \
  --frequency daily

Deleting a Scheduled Deployment

dhq scheduled-deploys delete <id> -p my-app

Deployment Checks

Deployment checks gate a deployment at one of two stages:

  • pre_build -- runs before the build, on the build server
  • post_deploy -- runs after files have been uploaded to your servers

The CLI creates three types of check:

  • ssh -- runs a command over SSH on selected servers
  • http -- sends an HTTP request and validates the response
  • vulnerability_scan -- runs a security scanner against your source (chosen with --scanner); pre_build only. See Vulnerability scan checks for the supported scanners, severity thresholds, and findings.

DeployHQ also supports post-deploy error_monitoring checks that watch a linked error-tracking integration after a deployment. For the full list of check types and options, see Deployment checks.

Listing Deployment Checks

dhq deployment-checks list -p my-app

Viewing a Deployment Check

dhq deployment-checks show <id> -p my-app

Creating a Deployment Check

An SSH check that runs after a deploy:

dhq deployment-checks create -p my-app \
  --name "Smoke test" \
  --stage post_deploy \
  --check-type ssh \
  --command "curl -sf http://localhost/health" \
  --servers production

An HTTP check that verifies the site responds after deploying:

dhq deployment-checks create -p my-app \
  --name "Homepage 200" \
  --stage post_deploy \
  --check-type http \
  --http-url "https://example.com" \
  --http-expected-status 200

A vulnerability scan that runs before the build:

dhq deployment-checks create -p my-app \
  --name "Dependency scan" \
  --stage pre_build \
  --check-type vulnerability_scan \
  --scanner trivy \
  --severity-threshold high

Updating and Deleting

dhq deployment-checks update <id> -p my-app --enabled=false
dhq deployment-checks delete <id> -p my-app

Integrations

Integrations send notifications about deployments to external services (e.g., Slack, email, webhooks).

Listing Integrations

dhq integrations list -p my-app

Viewing an Integration

dhq integrations show <id> -p my-app

Creating an Integration

dhq integrations create -p my-app \
  --type slack \
  --settings '{"webhook_url":"https://hooks.slack.com/services/..."}'

Updating an Integration

dhq integrations update <id> -p my-app \
  --settings '{"webhook_url":"https://hooks.slack.com/services/new-url"}'

Deleting an Integration

dhq integrations delete <id> -p my-app

Network Agents

Network agents allow DeployHQ to deploy to servers behind firewalls. The agent runs on a server inside your network and creates an outbound connection to DeployHQ.

Listing Agents

dhq agents list

Creating an Agent

dhq agents create --name "Office Network" --zone eu

Updating an Agent

dhq agents update <id> --name "New Office Network"

Revoking Agent Credentials

If an agent's credentials are compromised, revoke them:

dhq agents revoke <id>

After revoking, you will need to reconfigure the agent with new credentials.

Deleting an Agent

dhq agents delete <id>