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.
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:
Install
jq.Generate a GitHub personal access token with the repo scope and set it as the
GITHUB_TOKENenvironment variable value.
Execute the prune_preview_branches.sh script in your fork.
To prune locally merged preview branches:
export DELETE_BRANCHES="local" ./prune_preview_branches.shTo 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:
Open the
build.shscript.In the script, locate and modify the following line (L55):
git clone --single-branch --branch master https://github.com/pingcap/website-docsReplace
masterwith the name of your desired branch, or update the repository URLhttps://github.com/pingcap/website-docsto your preferred repository.Preview your changes by updating the scaffold and content. For more information, see Usage Guide.
