Skip to content

Commit

Permalink
docs: update docs deployment (#1841)
Browse files Browse the repository at this point in the history
  • Loading branch information
MSalopek authored Apr 30, 2024
1 parent d282e07 commit 4975d6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ The script switches branches while building the versioned docs - **please note t

# Legacy documentation

`legacy-docs-page` [branch](https://github.com/cosmos/interchain-security/tree/legacy-docs-page) contains documentation for versions `<= v4.0.0`. These versions were built using docusaurus `v2.4.0` which is not compatible with docusaurus `v3.x` used at the time of writing. It was not feasible to port the legacy docs from `v2.4.0` because `v3.x` is not compatible with it and it required changing all release branches.
`legacy-docs-page` [branch](https://github.com/cosmos/interchain-security/tree/legacy-docs-page) contains documentation for versions `<= v4.0.0`. These versions were built using docusaurus `v2.4.0` which is not compatible with docusaurus `v3.x` used at the time of writing. It was not feasible to port the legacy docs from `v2.4.0` because `v3.x` is not compatible with it and it required changing all release branches and cutting patch releases.

The `legacy` directory on `legacy-docs-page` was created manually, by modifying `docusaurus.config.js` and `versions.json` on `https://github.com/cosmos/interchain-security/releases/v3.3.1-lsm` and generating the static pages manually using `npm run build`.
The `./docs/legacy` directory on `legacy-docs-page` was created manually, by modifying `docusaurus.config.js` and `versions.json` on `https://github.com/cosmos/interchain-security/releases/v3.3.1-lsm` and generating the static pages manually using `npm run build`.

The `legacy` directory gets included into the rest of the documentation using a simple `cp` command during the deploy process using the [build_deploy.sh](./build_deploy.sh) script. It is **not** included during local builds.
The `./docs/legacy` directory gets included into the rest of the documentation using a simple `cp` command during the deploy process using the [build_deploy.sh](./build_deploy.sh) script. It is **not** included during local builds.
7 changes: 5 additions & 2 deletions docs/build_deploy.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/bin/sh

# build versioned docs prepared by sync_versions.sh
echo "building docusaurus main docs"
npm ci && npm run build
# copy legacy docs to build folder
git fetch origin legacy-docs-page

# copy "legacy" docs directory into the final build directory
# the directory is in "docs/legacy" of the source branch (legacy-docs-page)
# the build environment must be in "./docs" for this to work as expected
git checkout origin/legacy-docs-page -- legacy
cp -r ./legacy ./build/
mv build ~/output
Expand Down

0 comments on commit 4975d6b

Please sign in to comment.