# Prerequisites & Key information
- About GitHub deploy
- Prerequisites
- Key Information
- Account-level connection:
- Worker process readiness:
- Deployment modes:
- 1-Click App installs:
- Handling of successful or failed deployments:
- Serving static assets
- Cancellation of a deployment:
- Backups
- Push live or cloning a website:
- Moving a website between accounts
- Disconnecting/reconnecting a repository from a website:
- Feature availability:
# About GitHub deploy
Enhance provides a Deploy via GitHub feature that allows you and your customers to deploy public or private repositories from a connected GitHub account. You and your customers can deploy PHP, Node.js, Laravel, or custom applications directly to new or existing production or staging websites.
# Prerequisites
- All servers within your cluster need to be able to reach the GitHub API.
- Users require a valid GitHub account (opens new window) to authenticate and use this feature.
# Key Information
# Account-level connection:
- A GitHub connection is configured at the account level. Once linked, any accessible repository can be deployed to any production or staging website owned by that Enhance account.
- Connecting Enhance to GitHub creates a custom application under the user’s GitHub account. The user has the option to choose which repositories the custom application has access to. Enhance will then use that application to read repository information.
- A GitHub connection can be disconnected at any point.
# Worker process readiness:
- Enhance supports automated deployments for PHP, Node.js, Laravel, static websites and Custom Applications (for instance a runtime built in Rust or Go). ‘Allow Worker processes’ must be enabled at a package level.
# Deployment modes:
- Repositories can be deployed manually or set up for continuous deployment on push. When someone pushes to the tracked branch or tag, GitHub will send a webhook to your control panel domain and, if auto deploy is enabled, Enhance will trigger a new deployment of the application.
# 1-Click App installs:
- Deploying via GitHub is not supported on websites that use Enhance 1-click installer applications (including WordPress, WordPress + WooCommerce, OpenCart, and Joomla).
- For websites running 1-click installed applications, the GitHub section is not accessible from the website management dashboard.
# Handling of successful or failed deployments:
- Each deployment is given its own directory within the home directory of the website under “deploys”, named with a UUID for uniqueness. The symlink “deploys/current” points to the latest successful deployment.
- A deployment is only considered successful if Enhance can perform a shallow clone of the specified branch or tag. If a build command is specified this must also succeed - it must emit a 0 exit code.
- On success, the symlink in deploys/current will be updated to the latest deployment. Any worker processes will be restarted. If a publish directory is configured, this will be set as the website document root (deploys/current/$publish_directory).
# Serving static assets
- To serve external static assets that are not included in your Git repository, create a dedicated subdomain (e.g., assets.yourdomain.com) pointing directly to your static assets directory, then reference those URLs within your application.
# Cancellation of a deployment:
- A deployment may be proactively cancelled if the clone or build command are in progress. This will not update deploys/current.
- If a new deployment is initiated via push notification or manually in the UI, any in-flight deployments will be cancelled.
# Backups
- All data from the Git deployment including the deployment history is stored in backups if enabled on your cluster.
- The GitHub connection details are not stored in backups.
# Push live or cloning a website:
- When pushing a staging site live or cloning a website, the GitHub connection details will not be copied to the destination website. Deployment history will remain.
# Moving a website between accounts
- When moving a website between accounts, the GitHub connection details will not be copied. Deployment history will remain.
# Disconnecting/reconnecting a repository from a website:
- A website can be disconnected from GitHub at any time. The existing website (worker processes, etc) will continue to run and no files will be removed. Deployment history will remain. It is then possible to connect the website to a different repository or branch.
- If GitHub is disconnected at an account level, all websites using that connection will also be disconnected from GitHub.
# Feature availability:
- GitHub deploy is enabled by default and cannot be disabled on a package level.
- GitHub deploy is only available on normal and staging websites. It is not available on CTL, WML or PMA.