Repository navigation
This is a breaking rewrite. The action now wraps the official dhq CLI instead of POSTing to a webhook URL.
To stay on the old behaviour, pin deployhq/deployhq-action@v1.
Quick start
- name: Trigger DeployHQ deployment
uses: deployhq/deployhq-action@v2
with:
api-key: ${{ secrets.DEPLOYHQ_API_KEY }}
account: ${{ secrets.DEPLOYHQ_ACCOUNT }}
email: ${{ secrets.DEPLOYHQ_EMAIL }}
project: my-project
server: productionThe action installs the pinned dhq CLI on the runner, calls dhq deploy, waits for the deployment to reach a terminal status, and fails the job if it didn't succeed.
Breaking changes
- Auth — webhook URL replaced by API key. New required inputs:
api-key,account,email. - Input style — inputs are now declared properly via
with:instead of passed throughenv:. The legacyDEPLOYHQ_*env vars are no longer recognised. - Removed inputs —
DEPLOYHQ_WEBHOOK_URL,REPO_CLONE_URL. The CLI resolves the repository from the project configuration. - Defaults changed —
revisionnow defaults to${{ github.sha }}(was"latest").branchno longer defaults tomain; the CLI auto-resolves it from server config. - Runtime — Docker (Alpine) action replaced by a composite action. Now runs on Linux, macOS, and Windows runners, including self-hosted.
Added
- New inputs —
project,server,wait,timeout,dry-run,full,start-revision,extra-args,cli-version. - New outputs —
deployment_id,deployment_url,status,server,project. - Wait for completion — polls
dhq deployments showuntil the deployment reaches a terminal status, with an optionaltimeout. The job's exit code reflects the deployment result. - Job step summary — a table with deployment ID, status, project, server, and a direct link.
- Supply-chain hardening — the CLI version is pinned and every download is verified against the release's SHA-256
checksums.txt.
Migration from v1
v1 took its configuration through env:; v2 uses declared with: inputs.
- uses: deployhq/deployhq-action@v1
- env:
- DEPLOYHQ_WEBHOOK_URL: ${{ secrets.DEPLOYHQ_WEBHOOK_URL }}
- DEPLOYHQ_EMAIL: ${{ secrets.DEPLOYHQ_EMAIL }}
- REPO_REVISION: ${{ secrets.REPO_REVISION }}
- REPO_BRANCH: ${{ secrets.REPO_BRANCH }}
- REPO_CLONE_URL: ${{ secrets.REPO_CLONE_URL }}
+ uses: deployhq/deployhq-action@v2
+ with:
+ api-key: ${{ secrets.DEPLOYHQ_API_KEY }}
+ account: ${{ secrets.DEPLOYHQ_ACCOUNT }}
+ email: ${{ secrets.DEPLOYHQ_EMAIL }}
+ project: my-project
+ server: productionInput-by-input:
v1 (env:) |
v2 (with:) |
Notes |
|---|---|---|
DEPLOYHQ_WEBHOOK_URL |
api-key + account |
Webhook URLs are gone. Generate an API key in Account Settings → API access. |
DEPLOYHQ_EMAIL |
email |
Unchanged in meaning. |
REPO_REVISION |
revision |
Now defaults to ${{ github.sha }} instead of "latest". |
REPO_BRANCH |
branch |
No longer defaults to main; auto-resolved from server config when omitted. |
REPO_CLONE_URL |
— | Removed. The CLI resolves the repository from the project configuration. |
| — | project, server |
New. Identify what to deploy and where. |
Full details in the README.
Exit codes
| Code | Meaning |
|---|---|
0 |
Deployment succeeded (or was queued when wait: false) |
1 |
Deployment failed |
2 |
Deployment cancelled |
124 |
Timed out waiting for a terminal status |
Tested against dhq CLI v0.17.1. Override with the cli-version input.