Version: 4.1
Git Deployment
The gitdeploy commands publish a website from a remote Git repository. They
are the same thing the panel's
Git Deployment page drives, and they are available
only when the services run on the host, not on the container stack.
Attach a repository
hitechcloudcli gitdeploy-setup <user> <domain> [options]
| Option | What it does |
|---|---|
--repo <url> | The remote to deploy from. https:// for a public repository, ssh/git@ for a private one. |
--branch <name> | Branch to deploy. Default main. |
--build <command> | Build command, run as <user> in a copy of the checkout. Omit for a site that needs no build. |
--build-b64 <base64> | The same command, base64 encoded — what the panel sends, so a multi-line script survives the trip. |
--subdir <path> | Directory inside the repository to publish, e.g. dist, public, build. |
--publish <sync|copy> | sync mirrors the build into the document root and deletes what is no longer in it; copy overlays. |
--exclude "<a b c>" | Paths sync must never delete — uploads, .env, cache. |
--schedule <minutes> | Poll the remote this often. 0 turns polling off. |
--auto <on|off> | Deploy automatically when a poll finds a new commit. |
--webhook <on|off> | Accept the panel's webhook URL for this site. |
--service <name> | Restart this application of the account after a deploy — see hitechcloudcli service. |
--timeout <seconds> | Build timeout, 30–21600. |
--memory <NNN[KMG]> | Build memory limit. |
--cpu <NN%> | Build CPU quota. |
Deploy
hitechcloudcli gitdeploy-deploy <user> <domain> [options]
| Option | What it does |
|---|---|
--commit <sha> | Deploy this commit instead of the branch tip — how the panel redeploys an earlier commit. |
--trigger <what> | manual (default), webhook or poll. Recorded in the history. |
--background | Start the deploy, print its id and return immediately. |
The rest
hitechcloudcli gitdeploy-list [<user>] # every site deployed from a repository
hitechcloudcli gitdeploy-poll [<user> <domain>] # ask whether the branch has moved
hitechcloudcli gitdeploy-key <user> <domain> [--regenerate]
hitechcloudcli gitdeploy-remove <user> <domain> [--purge]
gitdeploy-key shows, or replaces, the deploy key the site fetches its code
with. Put the public half on the repository as a read-only deploy key.
Nothing here hosts a repository: the server reads a remote, it never accepts a push and never serves a repository.
Was this helpful?