Summary

Deploying the site means to update the production environment (such as on-prem, or Github pages or Netlify, or similar). This is the next step after building and testing the site. It is strongly recommended to not build the site directly in the production environment, mostly when this environment is hosted by Github pages or Netlify or similar (build time can be long and can consume CI/CD minutes for tasks that are not necessary to be executed in production environment).

In essence, deploying means to move the assets generated by the site build process to their final destination, the place targeted by the site production URL defined as environment variable, under the key DEPLOY_PROD_BASE_URL. This final place can be on a private infrastructure/server or hosted by Github pages or Netlify or other similar hosting solutions.

The deployment process depends on the production environment option. Docaroo provides out-of-the-box actions to deploy on Github pages and on Netlify.

Limitations

Environment variables

The environment variables used for the deployment process are shown next:


          JEKYLL_ENV: production
          JEKYLL_ACCESS_TOKEN: ${{ secrets.JEKYLL_ACCESS_TOKEN }}
          JEKYLL_GIT_USER: ${{ secrets.JEKYLL_GIT_USER }}
          CONSOLE_BLANK_SPINNER_CHARS: ${{ secrets.CONSOLE_BLANK_SPINNER_CHARS }}
          ALGOLIA_WRITE_API_KEY: ${{ secrets.ALGOLIA_WRITE_API_KEY }}
          ALGOLIA_INDEX: ${{ secrets.ALGOLIA_INDEX }}
          ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
          ALGOLIA_PUBLIC_API_KEY: ${{ secrets.ALGOLIA_PUBLIC_API_KEY }}
          ALGOLIA_SEARCH_ENABLED: ${{ secrets.ALGOLIA_SEARCH_ENABLED }}
          DEPLOY_PROD_BASE_URL: ${{ secrets.DEPLOY_PROD_BASE_URL }}
          NR_ENABLED: ${{ secrets.NR_ENABLED }}
          NR_BROWSER_ENABLED: ${{ secrets.NR_BROWSER_ENABLED }}
          NR_BROWSER_APP_ID: ${{ secrets.NR_BROWSER_APP_ID }}
          NR_ACCOUNT_ID: ${{ secrets.NR_ACCOUNT_ID }}
          NR_BROWSER_APP_LICENSE_KEY: ${{ secrets.NR_BROWSER_APP_LICENSE_KEY }}
          NR_BROWSER_BEACON: ${{ secrets.NR_BROWSER_BEACON }}

      

When deploying on Github pages or Netlify, please consult the related documentation for understanding how to create the Github repository action secrets or Netlify build environment variables.

Env. variables

Github pages

Before deploying on Github pages it is necessary to configure the pages for the site repository.

Deployment on Github pages is provided out-of-the-box by a deployment action.

📁 workflows/
├── 📄 deploy-site-multilang-no-py.yml
└── 📄 deploy-site-multilang.yml

The action used for Github pages deployment is deploy-site-multilang-no-py.yml ans is named (NO-PY) Manual Deploy Multilingual Jekyll site to Pages. This action is designed to perform the minimum needed processing of the content for production and for deploying a multilanguage site (each language variant being hosted in a dedicated repository branch named with the two-digit language code). It is also designed to not executing the time consuming building tasks (the ones based on using Huggingface models or using intensive Python content processing), thus we emphasise again that ALWAYS BUILD AND TEST THE SITE IN THE DEVELOPMENT ENVIRONMENT BEFORE DEPLOYING TO PRODUCTION.

See in the next video how a successful deployment on Github pages should look like:

YouTube Thumbnail

It is seen that the deploy action is triggered manually. Of course, at any time, the action trigger can be modified in order to start the deployment automatically (i.e. when new content is pushed to the gh-pages or any language branch) or scheduled (if your Github plan allows to schedule actions).

Netlify

Before deploying on Netlify it is necessary to configure the environment for the site repository. Builds

See in the next video how a successful deployment on Netlify should look like:

YouTube Thumbnail

Deployment to Netlify is even more straight forward than deployment on Github pages. Once the Netlify site is connected to the site repository (to the production branch of your choice) and the environment variables are set, builds are automatically triggered when push on the production branch.

One important reason to choose Netlify as production environment is that, even in the free plan, Netlify provides a solution to have a backend (Netlify functions) and this can open many opportunities to further extend the functionality.

Multiple authors

Using Docaroo in a multi-authors environment depends on the maturity of the organisation in using various collaboration/sharing tools.

The easiest option for having multiple authors is to clone the site repository on a shared folder in your network (✳️ this will be the development environment ✳️) ➡️ install the editor of your choice on the devices of the authors ➡️ add shared doc-contents to the editors ➡️ build and test in development environment ➡️ deploy to production environment.

It is also possible to create a more sophisticated environment using Git Submodules: Create a dedicated contents repository ➡️ Clone Docaroo repository to your development environment ➡️ Remove default doc-contents folder ➡️ link contents repository to the main repository ➡️ install the editor of your choice on authors devices ➡️ clone/fork the content repository on author devices ➡️ for convenience, Github desktop can be installed to authors devices to facilitate pushing content to the content repository ➡️ merge pull requests opened by authors when pushing updates to the content repository ➡️ fetch content repository into main repository on the development environment ➡️ build and test ➡️ deploy in production

On this page



Comments
Title : pageTitle
Reference : anchor