Skip to content

Latest commit

 

History

History
55 lines (30 loc) · 3.45 KB

10-docs-preview.md

File metadata and controls

55 lines (30 loc) · 3.45 KB
title
Documentation preview

Before you publish new documentation on the Kyma website, you can preview your changes to see if the formatting of the text is correct, images fit well, and links work as expected.

That is possible thanks to the preview feature supported by Netlify. It attaches links to autogenerated previews of all website views to your pull requests (PRs).

This feature is enabled on these Kyma repositories:

  • kyma for changes in the /docs folder that contains sources of the official Kyma documentation rendered in the Docs view.

  • cli for changes in the /docs folder that contains sources of the official Kyma CLI documentation rendered in the Docs view under the CLI subview.

  • control-plane for changes in the /docs folder that contains sources of the official Kyma Control Plane documentation rendered in the Docs view under the Control Plane subview.

  • community for changes rendered in the Community view.

  • website for changes rendered on the landing page and in the Blog view.

Previews are built for PRs containing changes made in all the mentioned paths within these repositories for both successful and failed builds. The only exception is the kyma repository. Netlify publishes notifications only for successful builds on such PRs.

Access previews

After you create a PR, Netlify attaches a notification to your PR on the build status and a link to:

  • A website preview for successful builds

    Successful preview

    NOTE: The preview rebuilds automatically under the same link after every commit.

  • A direct link to log details for failed builds

    Failed preview

The website preview deployment is also visible on the list of jobs that need to pass for the PR before it can be merged. Click on Details to go to the build logs.

Job details

NOTE: For the kyma repository, Netlify only attaches notifications for successful preview builds. Thus, if you make any changes in the /docs folder and there is no website preview attached to your PR, access failed build information through the link under Details available next to the preview job.

Add the preview to a repository

  1. Make sure that the documentation of the given repository is rendered on the Kyma website.

  2. Contact the maintainers of the Kyma website to configure Netlify for the new repository.

  3. Copy the build-preview.sh script to the .kyma-project-io folder in the new repository. In this script, change the name of the repository under the exported APP_PREPARE_FOR_REPO environment:

    export APP_PREPARE_FOR_REPO="{REPOSITORY_NAME}"
  4. Merge changes and Netlify will start generating website previews on PRs in the new repository.