-
Notifications
You must be signed in to change notification settings - Fork 4
Deploying to multiple site instances
Following this section will allow you to deploy your versions to other site instances (e.g. staging, production) later. This feature is completely optional.
Site instances allow you to work on different versions of the same content at the same time. E.g. one version could be the currently active production version on the production site while editors work on new content on the staging site and developers tinker around with test content on a testing site.
By connecting the different instances through the plugin, you can access all created versions from all connected site instances. This allows you to e.g. push a new version from staging to production without even logging in to the Panel of the production site (which means you can disable the production Panel completely). You can also pull a version from another instance to the current instance (e.g. when a developer needs to pull in the current version to the test instance).
Deploying versions to multiple sites currently only works if all sites are hosted on the same server (i.e. if Kirby has access to the file system of all sites).
In the following steps, the "main site" is the site where you have initialized the Git repository by following the steps above. The "other sites" are the sites that you want to integrate into the process.
- The Git repository in the
content
directory of your main site already needs to be set up. Please make sure to complete the Initial setup before you continue. - Delete the
content
directories of the other sites. Make sure to keep a backup of the content in case it differs from the content of the main site. - Run the following command in the
content
directory of your main site for each other site you want to set up:
git worktree add /path/to/other/site/content $tagName
- Configure the instances in the Kirby configuration of all sites.