Deploy a website with Git
Use Git to deploy a reviewed release, not to expose a repository directory as a website. Build requirements still depend on the application.
Before you begin
Use the APNCloud Hosting Panel. The tools available to you depend on account permissions and the plan. If an option is missing, ask support whether your service includes it.
Steps
- Confirm the panel’s Git feature, repository access and any shell/build support required by the project.
- Use a narrowly scoped deploy key for a private repository. Verify the remote host fingerprint through a trusted source. Keep credentials out of repository URLs.
- Clone into a private release directory outside the public document root. Choose the intended branch or immutable release reference.
- Install locked dependencies and build assets in that private directory. Keep uploaded files, secrets and databases outside the replaceable release.
- Back up data, review migrations and publish only the application’s public directory or static build output. A pull alone does not build the app or restart workers.
- Test health and user workflows before switching traffic. Keep the previous release and compatible database recovery plan for rollback.
Check the result
Test the intended task and unrelated website and email functions. If a tool is missing or the result is unexpected, keep the error and time and contact support instead of guessing server-wide settings.
Related articles
Last reviewed
2026-10-28
