Custom Actions

Any Container,
Inside Your Deploy

Run any Docker image as part of a deployment — invalidate a CDN, apply Terraform, restart a Kubernetes rollout, hit any cloud API. Curated templates for the tools you already use, or drop in your own image.

Any Docker image
Templates: AWS CLI, Terraform, kubectl & more
Runs inside the deploy pipeline

Last updated on 29th May 2026

A Custom Action is a step in your deploy pipeline that runs any Docker image you choose with arguments and environment variables you control. The container has access to your deployed source and your project's environment variables, exits with a status code, and streams its output to the deploy log alongside everything else. Anything you can do in a CLI, you can do as part of a DeployHQ deployment.

Curated Templates

Start from a tested template for the most common tools, or bring any Docker image of your own.

AWS CLI

Invalidate CloudFront, copy to S3, refresh Lambda aliases, hit any AWS API with the same image you use locally.

Terraform

Run terraform apply against the infra that hosts your app — keep app and infra changes in lockstep, gated by the same deploy.

kubectl

Roll out new images, restart deployments, scale replicas. Authenticate to your cluster from the action and run any kubectl command.

Capistrano

Run your existing cap deploy or cap-style tasks from the pipeline — keep your legacy Ruby recipes while DeployHQ owns the build, file transfer, and rollback.

Deployer

Drop in your existing deploy.php recipe to run a Deployer flow from the pipeline — no separate runner host to install, patch, or maintain.

Bring Your Own Image

Any public or private Docker image works. Wrap an internal tool, run a custom script in alpine, or pull a vendor's image you already trust.

Why Use Custom Actions

One pipeline, one deploy log, one place to fail. Stop scattering deploy-adjacent work across CI jobs and wiki pages.

One Pipeline, Not Three

Build, deploy, and post-deploy infrastructure tweaks live in the same DeployHQ pipeline. No separate CI job to keep in sync, no manual "now run this script" step in the runbook.

Real Failure Handling

An action's non-zero exit fails the deployment. The CDN didn't invalidate? Deploy is marked failed and your usual failure notifications fire. No silent half-deploys.

Secrets Stay in DeployHQ

Project and account environment variables are available to the container. AWS keys, kubeconfigs, and Terraform tokens live in DeployHQ's encrypted store — not in your repo, not in your local shell history.

Any Tool, Without Hosting It

Need a tool DeployHQ doesn't bundle? Use the official Docker image. No agent to install, no plugin system to wait on.

What People Use Them For

The same primitive, very different jobs.

CDN cache invalidation

An AWS CLI action that runs after the upload step and invalidates CloudFront — your users see the new build the moment the deploy is marked complete.

Infra changes alongside the app

A Terraform action gated on the same pipeline as the app deploy. A new feature flag, a new SQS queue, an updated IAM policy — applied at exactly the same time the new app code goes live.

Kubernetes rollouts

A kubectl action that restarts a Deployment or applies a fresh manifest after the image has been pushed. The deploy doesn't complete until the rollout reports healthy.

Reuse a Capistrano recipe

A cap deploy action that runs your existing Capistrano tasks from the pipeline — migrations, asset precompile, service restarts. Keep proven Rails deploy recipes while DeployHQ owns the build and file transfer.

PHP app deploys with Deployer

A Deployer action that runs your existing deploy.php from the pipeline. Reuse the Laravel or Symfony deploy flow your team already wrote, without standing up a separate Deployer runner.

Custom notifications & webhooks

A curl-in-a-container action that hits an internal API — page the on-call, ping a status page, or trigger a downstream pipeline outside DeployHQ.

Getting Started

Add your first Custom Action in minutes

Check mark

Pick a template or an image

Choose from AWS CLI, Terraform, kubectl, Capistrano, or Deployer — or paste in any Docker image reference.

Check mark

Configure the command

Set the command and arguments. Wire in project or account environment variables for any secrets the container needs.

Check mark

Pick where it runs

Slot the action into the pipeline — alongside build commands, after files are uploaded, or as the very last step.

Check mark

Deploy and read the log

Every deploy now runs the action. Its stdout and stderr stream into the deploy log alongside everything else.

Read the documentation →
PIPELINE WITH CUSTOM ACTION 1 · Build pipeline · npm run build 2 · Upload to servers 3 · Custom Action amazon/aws-cli:latest aws cloudfront create-invalidation --paths "/*" ✓ Deploy + CDN invalidated · 1m 12s Stdout streams into the deploy log

Frequently Asked Questions

How is a Custom Action different from a build command?

A build command runs your project's own build (npm install, composer install, etc.) in the language runtime you've configured. A Custom Action runs a separate Docker image you choose — useful when the work is not 'build this codebase' but 'call this tool', like invalidating a CDN or applying Terraform.

Do Custom Actions have access to my source code?

Yes, by default. The action runs with your deployed source mounted so it can act on the build output. You can also use an action purely for an external side-effect (an API call, for example) where source access doesn't matter.

Can a Custom Action use my private Docker image?

Yes. Provide the image reference and registry credentials as project or account environment variables — they're decrypted into the container at runtime.

What happens if a Custom Action fails?

A non-zero exit code fails the deployment. The usual failure notifications fire and the deployment is marked failed in the dashboard. No state is rolled back automatically — the same as any other deploy failure.

Where in the pipeline can a Custom Action run?

You can place actions before the build, after the build but before upload, after upload, or as the final post-deploy step. Most teams use them post-deploy for cache invalidation and infra reconciliation.

Bring your whole deploy into one pipeline

Stop juggling DeployHQ, GitHub Actions, and a runbook. Make every step run in one place, fail in one place, and audit in one place.

10-day free trial • No setup fees • Cancel anytime

Get started today for just $9/month

That's unlimited deployments and 3 projects.

Start your free 10 day trial