Step 1. Update scaffold
This document introduces what the scaffold is and how to update it.
Concept
In the pingcap-docsite-preview
context, scaffold refers to a specific set of elements synchronized from pingcap/docs-staging
. These elements are crucial for the structure and navigation of the documentation website. It contains the following elements:
Version selection: the
docs.json
fileTable of contents: all
TOC.md
files in themarkdown-pages
directoryIndex pages: all
_index.md
files in themarkdown-pages
directoryHomepage: all
_docHome.md
files in themarkdown-pages
directory
An example of the scaffold
Update the scaffold in GitHub Actions
In your fork, the
sync_scaffold.yml
workflow can be manually triggered (workflow_dispatch
) or automatically triggered every 15 days (0 0 */15 * *
) by default.on: workflow_dispatch: schedule: - cron: "0 0 */15 * *"To modify the schedule event or add more events to trigger the workflow, you can adjust the value of
on
in thesync_scaffold.yml
file.For more information, see Events that trigger workflows.
Update the scaffold locally
To update the scaffold of your fork on your local machine, you can execute the
sync_scaffold.sh
script.This script automatically updates the scaffold to the latest version from
pingcap/docs-staging
.To update the scaffold to a specific version, you can specify a branch or commit in
sync_scaffold.sh
.Examples:
git clone https://github.com/Oreoxmt/pingcap-docsite-preview.git cd pingcap-docsite-preview ./sync_scaffold.shgit clone https://github.com/Oreoxmt/pingcap-docsite-preview.git cd pingcap-docsite-preview ./sync_scaffold.sh $BRANCHgit clone https://github.com/Oreoxmt/pingcap-docsite-preview.git cd pingcap-docsite-preview ./sync_scaffold.sh $COMMIT