Deploy an application with Git

Prepare a Git deployment for your site, review its build steps, then inspect the result. We use a Laravel application example. Configuration, logs and outcomes on these screens are synthetic; no repository connection or live deployment is performed.

Before starting, create the site, confirm update permission and review its runtime, document root and application requirements. Have a reviewed repository branch, a private repository access plan and tested recovery copies. Rehearse on an isolated test site before applying production changes.

Screens show Herne 3.55.43 with synthetic Northstar Studio data. Configuration, warnings and success/failure logs are illustrative. No Git connection, build, migration, key generation, webhook activation, environment save or real application check is executed. Secret fields are empty and environment examples contain no passwords or keys. Interface and narration are English; written guidance and selectable subtitles are available in six languages.

Watch the walkthrough

English audio · 5 min 38 sec · Subtitles in all six site languages.

1. Choose the site and prepare recovery

Open the correct site and choose Deploy, then Git Deploy. Check the domain and your permission to update it. This guide follows the repository workflow. Publisher Deploy is a separate artifact-based option; do not combine both methods on an application without a reviewed ownership plan.

Before changing a working site, keep tested file and database backups off the server. Review the intended release and maintenance window. Existing Git checkouts are fetched and hard reset to the saved remote branch, so preserve any tracked files edited directly on the server.

Git Deploy form before configuration, with fixed site root and no saved deployment.

2. Set repository, path and branch

Enter the exact application repository URL. A public repository can use HTTPS; a private repository normally needs SSH with an authorized deploy key. Never embed a password or access token in the URL. Confirm the repository owner and Git server before saving.

The deploy path begins at this site’s web root. Leave the suffix empty for our example, or use a reviewed subfolder. A suffix does not automatically change the public document root. For Laravel, verify that the served document root points to the application’s public directory, not its project root.

Enter the branch that contains the reviewed application release; main is only our example. Confirm that the branch exists and contains the expected code. Saving configuration is not a repository connectivity test, a code review or an application deployment.

Illustrative configuration values only; replace them with your reviewed application settings. This block is not a terminal command.

Repository: git@git.example.test:northstar/studio-app.git
Branch: main
Deploy path: /var/www/studio.example.test/web_root
Path suffix: (empty)
Synthetic repository URL, main branch and fixed site deploy path; migration and cache options are off.

3. Review build and environment steps

Enable only the steps your application requires. Composer installs production PHP dependencies. The optional npm step runs a clean install and then the application build; it needs the appropriate lockfile and server toolchain. It applies to the managed site, never to Herne Panel itself.

Leave migrations disabled until the application database, permissions and migration plan are verified. The selected migration step runs with force and can change production data structures. Test it first and keep a usable backup. Deploying an earlier commit does not automatically reverse database migrations.

Review this application’s environment privately before enabling cache steps. Use its own database and preserve the existing application key; never replace it casually on a working application. Cache processing clears optimization caches and optimizes again. Herne can block unsafe database or missing application-key settings; fix the cause instead of bypassing the guard.

Step What to review
composer install Production PHP dependencies and lockfile
npm ci / npm run build Application build requirements and server toolchain
php artisan migrate Reviewed schema changes, correct database and recovery copy
optimize / cache clear Existing application key, safe environment and cache plan
Composer and optional npm build selected for illustration; migration and cache remain unchecked.
Synthetic production environment and database names; no application key or password is shown.

4. Save configuration and check readiness

After reviewing repository, branch, path and selected steps, choose Save configuration. Reopen the saved values and check them. The example keeps migrations and cache steps off for the first review. On a private SSH repository, saving may also prepare a deploy key; it does not grant repository access by itself.

For a private repository, use the public deploy key from this site and authorize it for the intended repository with read-only access where supported. Keep the private key and webhook secret private. Verify access with your administrator; key generation alone does not prove that the correct Git server or repository is trusted.

Before Deploy now, confirm the release branch, application environment, PHP version, public document root and build requirements. Keep recovery copies ready and control conflicting application writes when needed. A preflight warning needs investigation; turning a guarded step off does not make an unsafe application configuration correct.

Example warning asks for an application environment review before database or cache steps.

5. Deploy once and verify the application

When the plan is ready, select Deploy now once and wait for the result page. Herne synchronizes the configured Git branch and runs the selected steps for this site. Do not start overlapping deployments or refresh and resubmit while a request is unresolved. An in-progress indicator is not a successful release.

Review the deployment status and the output of each selected step. Check that the source is Git and the expected branch and actions were used. A successful log still needs an application check. The success shown here is a prepared example, not evidence that a real application was deployed.

Open the application through its intended HTTPS hostname and check important pages, static assets and a database-backed request. Inspect enabled queue workers too; a graceful restart request is not proof of healthy processing. Verify the served code and monitor errors before declaring the deployment complete.

Synthetic successful Git deployment log explicitly states that no deployment was executed.

6. Diagnose failures and prepare later releases

On failure, read the failed step and preserve a private diagnostic record without credentials. A failed deployment may already have changed files, dependencies or schema; automatic rollback is not promised. Investigate access, branch, build requirements and application safety before a reviewed retry or recovery.

After the manual workflow is proven, a separately configured signed webhook can deploy pushes for the saved branch. It can change the live application, so protect its secret and review repository automation permissions. This guide does not enable a webhook. Keep deployment history and recovery records together.

You now have a deployment checklist: reviewed source and branch, correct site path and environment, necessary build steps, recovery copies and application verification. Repeat those checks for later releases. Updating Herne Panel is a separate administrator process, which we will cover in the next guide.

Synthetic failed Git log asks for a database configuration review without showing credentials.
Deployment history contains one illustrative success and one illustrative failure.
Documentation