github.com/cosmos/cosmos-sdk@v0.50.10/docs/build-all.sh (about)

     1  #!/bin/sh
     2  
     3  # This builds the docs.cosmos.network docs using docusaurus.
     4  # Old documentation, which have not been migrated to docusaurus are generated with vuepress.
     5  COMMIT=$(git rev-parse HEAD)
     6  mkdir -p ~/versioned_docs  ~/versioned_sidebars
     7  for version in $(jq -r .[] versions.json); do
     8      echo "building docusaurus $version docs"
     9      git clean -fdx && git reset --hard && git checkout release/$version.x
    10      ./pre.sh
    11      npm ci && npm run docusaurus docs:version $version
    12      mv ./versioned_docs/* ~/versioned_docs/
    13      mv ./versioned_sidebars/* ~/versioned_sidebars/
    14  done
    15  echo "building docusaurus main docs"
    16  (git clean -fdx && git reset --hard && git checkout $COMMIT)
    17  mv ~/versioned_docs ~/versioned_sidebars .
    18  npm ci && npm run build
    19  mv build ~/output
    20  echo "adding swagger docs"
    21  cp -r ../client/docs/swagger-ui ~/output/swagger
    22  while read -r branch path_prefix; do
    23      echo "building vuepress $branch docs"
    24      (git clean -fdx && git reset --hard && git checkout $branch && npm install && VUEPRESS_BASE="/$path_prefix/" npm run build)
    25      mkdir -p ~/output/$path_prefix
    26      cp -r .vuepress/dist/* ~/output/$path_prefix/
    27  done < vuepress_versions
    28  echo "setup domain"
    29  echo $DOCS_DOMAIN > ~/output/CNAME