One of Kajoo’s most convenient features is the ability to publish projects directly to a GitHub repo, multiple Sitecore instances, and directly to the head if desired.
In order to publish a Kajoo project to a Github repo, a Sitecore instance and/or to a head, you must already have registered your Sitecore instances with Kajoo and configured site settings. Please refer to our documentation on Connecting Kajoo to Sitecore to set up the proper configurations, and let us know if you have any trouble!
You’ll need an existing JSS app, and you’ll need a GitHub repo for it. When you publish your Kajoo project, Kajoo will generate code, check it into your app’s repo, then build the app before sending it to the Sitecore instance(s) of your choice.
App Configuration - Prettier
Before you can build your JSS app, you need to make a change to its Prettier settings, so you don’t run into build errors.
There should be a .prettierrc file in your JSS app’s root folder. In this file, the endOfLine parameter should be 'auto'. Deployment will fail otherwise.
In Step 2, choose the site configured with the desired GitHub repo and branch
In Step 3, click “Publish”. Your generated code should be checked into the GitHub repo and branch set up in your Site Configuration.
You can choose to simply download your generated code from your Kajoo project. This option does not require Site Configuration, setting up a GitHub repository, or connecting a Sitecore Instance.
In Step 1 on the Publishing Options Modal, choose “Download”.
In Step 2, simply press “Publish”.
In Step 3, press the “Download” button. You will download your generated React/JSS code in a zip file.
Download in Next.JS
Whatever your Site Configuration settings, you can always choose to download your project’s code in either React or Next.JS now. In the publishing wizard, simply choose the framework of your choice after selecting the “Download” option.
Deployment to Site
You can choose to deploy your Kajoo project to a configured site (see Connecting Kajoo to Sitecore). If you have not yet configured a site, please refer to that documentation, as Site Configuration includes all important deployment configuration, including registering Sitecore instances with Kajoo, connecting GitHub, and selecting Head deployment options, if any.
To deploy to a configured site, select the “Deploy” option in step 1 of the Publishing Options modal.
In Step 2, select among configured sites to deploy to:
In Step 3, select among the Environments attached to your configured site (eg. QA, UAT, Prod, etc). The environment selection determines which Sitecore instance(s) your code will be deployed to.
In Step 4, click “Publish.” Your code should be generated, pushed to your GitHub repo, built, then pushed to your Sitecore instance(s) of choice. Depending on your site configuration, it may also be deployed to your site’s head through FTP or SSH.
From the Deployments page, you can see the logs for each attempted deployment. Additionally, you can download the generated code from each deployment, even if you had selected the “Check-In” or “Deploy” options in the publishing wizard.