Deployment
Deploy a Git application, read every deploy's build log, redeploy a commit, edit the deploy script and branch, turn on deploy on push, and switch the repository.
Deployment is for applications created from a Git repository. It deploys the code, keeps a history of every deploy with its build log, and can deploy again each time you push. Open the application, then select Deployment in its sidebar, under Website.
An application that is not linked to a Git repository has no deploys: "This application isn't linked to a Git repository, so it has no deploys. Applications created from a Git repository are deployed here." See Create an application for how to create one from Git.

At the top a card shows the state of the last deploy:
- Not deployed yet: "Nothing has been deployed from the repository yet. Deploy now to fetch and build it."
- Deploying…: "The site keeps serving the previous code until the deploy finishes." It shows Deploy progress and "Now: step", or "Waiting for the server to start it…".
- Deployed: the commit message, the short commit, when it ran and "by name".
- Last deploy failed: the reason, and "The site still serves the previous code."
Under it are the Repository, the Branch and Deploy on push (On or Off).
The first deploy runs by itself when the application is created. After that you deploy by hand with Deploy now, from a push, or by redeploying an earlier commit.
Deploy now
- Select Deploy now. The button is off while a deploy is running.
- You see "Deploying now. This page updates on its own." The card shows the progress step by step, and a new row appears under History.
- When it ends you see "The deploy finished." or "The deploy failed."
A deploy fetches the code of the branch, checks it out and runs the deploy script as the application's system user. If a deploy fails the site keeps serving the previous code.
Read the history and the build log
The History tab lists Deploys: "The most recent deploys, newest first." Each row has Deploy (when it ran, what started it, such as "First deploy", and who), Commit (message, short commit and branch), Status, Took (for example "2 s" or "1 min 5 s") and Actions. A failed row shows the reason under Status. A commit without a message says "No commit message".
-
On a row, select Build log.

-
The sheet Deploy · when shows the commit and the Deploy steps, each ticked when it finished, then the Build log output. Select Copy log to copy it. A deploy with no output says "This deploy printed nothing." A failed deploy says "The deploy failed." and "The site still serves the previous code."
-
Select Redeploy commit to deploy that same commit again.
Redeploy a commit
On the History tab, select Redeploy on a row, or Redeploy commit in the build log. You see "Deploying commit again." When the last deploy failed, the top card also offers Redeploy commit and View build log.
Change the branch and the deploy script
-
Open the Settings tab.

-
Branch: "The branch each deploy checks out." Use letters, digits, dots, slashes, hyphens and underscores, up to 255 characters. When a connected Git account is used, the list shows the repository's branches.
-
Deploy script: "Runs after the code is fetched, as the application's system user." The placeholders
{path},{branch},{domain},{php}and{PHP84}are listed under You can use:. The script can be up to 65,535 characters. Leave it as the default, or edit it. Reset to default brings the default back ("The default script will be used. Save to confirm."). -
Select Save deploy settings. You see "Deploy settings saved." "Applies to the next deploy, not one running now." With nothing changed it says "Nothing to save."
Deploy on push
Deploy on push starts a deploy every time you push to the branch.
-
Open the Deploy on push tab.

-
Choose the Provider: GitHub, GitLab or Bitbucket.
-
For a provider that accepts your own token, Secret token (optional) appears. It must be at least 16 characters. "Leave empty and we make one."
-
Select Turn on. You see "Deploy on push saved." If the server could add the webhook to your repository for you: "Deploy on push is on. The webhook was added to your repository."
-
Otherwise add the webhook yourself. The page shows Add this webhook in provider with the Webhook URL and the Secret, each with a copy button. "The secret is shown only now. Save it in your repository's webhook settings before leaving this page."
-
Once it is on, the card says "Every push to branch starts a deploy." and "Last push received when."
To change the provider or the secret select Save. New secret makes a new one: "The old secret stops working. Update the webhook in provider with the new one." Turn the switch off to stop: "Deploy on push is off."
Change the repository
-
On the Settings tab select Change repository.

-
Choose Use a connected account (a Git account, a Repository and a Branch) or Use a public repository URL (an
https://address and a branch). This works like the source in Create an application. -
Select Change repository. You see "Repository changed. Deploy now to use it." "The next deploy fetches from the new repository. Nothing is deployed until you deploy."
If the Git account the application deploys with was removed: "The Git account this application deploys with was removed, so deploys can't fetch the code. Change the repository under Settings."
Limits
- Branch: up to 255 characters,
A–Z a–z 0–9 . _ / -only. - Deploy script: up to 65,535 characters.
- Secret token: 16 to 255 characters. Provider: lower-case letters, digits,
_and-. - A repository name for an account:
owner/namewith letters, digits,.,_and-. A public URL is up to 255 characters.
Who can do this
- Seeing the screen, the history and the build logs need View on Deployment
(
application.deployment). With view only the page says "You can see the deploys but not deploy or change settings." - Deploy now, Redeploy, the branch and script, Deploy on push and Change repository need Manage on Deployment.
- Changing the repository also needs Manage on Application (
application): "Changing the repository needs manage access to Applications." - Deployment can be given in a server share and to Control Panel customers.
Common errors
- Use letters, digits, dots, slashes, hyphens and underscores. The branch has a character that is not allowed.
- Use at least 16 characters. The secret token is too short.
- Not deployed from Git. The application has no repository: it cannot be deployed here.
- No access and Server isn't ready. Your role cannot see Deployment, or the server is not ready yet.
- A failed deploy shows its reason. Read the Build log to find the step that failed.