You can deploy your site straight from GitHub or GitLab. Every new version on the branch is deployed automatically, and you can go back to the previous version with one click. SFTP keeps working alongside.
Git deploy is available on sites on our new platform. You find it in your account under Web hosting by opening the site and the Deploy from git section. If the section says git deploy is not included in the plan, contact support.
git@github.com:company/site.git, and the branch, usually main.public.Your account shows the public key created for the site. It lets the server read the repository but not write to it.
On GitHub open the repository Settings, Webhooks and Add webhook, and fill in the form like this:
application/json from the menu. A different option is selected by default, so this has to be changed.Click Deploy now in your account. The status and log of the deploy are shown in the deploy history. After that every push to the branch is deployed automatically.
The build command runs before the deploy, for example npm ci && npm run build. It may take at most 15 minutes. Composer is not preinstalled, so use php composer.phar install or commit the vendor directory to the repository.
Every deploy replaces the site files with the new version. Paths marked as persistent are kept from one deploy to the next, so mark for example storage, .env and files uploaded by users, such as uploads.
In the deploy history each successful deploy has a Roll back to this version button. The rollback is immediate. You choose how many versions are kept in the settings.