Skip to main content
Version: 2.1.26

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 on the native stack only.

Attach a repository

hitechcloudcli gitdeploy-setup <user> <domain> [options]
OptionWhat 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 native-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]
OptionWhat 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.
--backgroundStart 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.