PingCAP Docsite Preview Help

Advanced Usage

Automatically prune merged preview branches

To keep your fork clean, you can automatically prune merged preview branches using prune_branches.yml or prune_preview_branches.sh.

Make sure that you have enabled GitHub Actions for your fork.
Enable GitHub Actions for your repository

In your fork, manually trigger the prune_branches.yml workflow for the main branch. After the workflow runs, merged preview branches will be deleted from the remote repository.

Prerequisites

Make sure that you have met the following requirements:

Execute the prune_preview_branches.sh script in your fork.

  • To prune locally merged preview branches:

    export DELETE_BRANCHES="local" ./prune_preview_branches.sh
  • To prune branches in the remote repository:

    export DELETE_BRANCHES="remote" ./prune_preview_branches.sh

Customize the documentation website frontend

You can customize the appearance of the documentation by modifying the frontend branch or repository settings.

By default, pingcap-docsite-preview uses the master branch of the website-docs repository for the frontend. To use a different branch or repository:

  1. Open the build.sh script.

  2. In the script, locate and modify the following line (L55):

    git clone --single-branch --branch master https://github.com/pingcap/website-docs

    Replace master with the name of your desired branch, or update the repository URL https://github.com/pingcap/website-docs to your preferred repository.

  3. Preview your changes by updating the scaffold and content. For more information, see Usage Guide.

Last modified: 01 April 2025