Merge pull request #17088 from tibroc/docs-build-only-from-develop

docs: Build docs only on develop
This commit is contained in:
Anton Georgiev 2023-03-21 12:40:20 -04:00 committed by GitHub
commit 8633594394
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 11 deletions

View File

@ -4,11 +4,9 @@ on:
workflow_dispatch:
push:
branches:
- 'v*'
- 'develop'
paths:
- 'docs/**'
- '.github/**'
# Do not build the docs concurrently
concurrency:

View File

@ -17,15 +17,14 @@ for branch in "${BRANCHES[@]}"; do
if [ "$branch" != "$current_branch" ]; then
git fetch "$REMOTE" "$branch":"$branch"
fi
git checkout "$branch"
if [ -f docusaurus.config.js ]; then
version=${branch:1:3}
echo "Adding documentation for $version"
yarn docusaurus docs:version "${version}"
else
echo "Warning: branch $(branch) does not contain a docusaurus.config.js!"
git checkout "$branch"
if [ -f docusaurus.config.js ]; then
version=${branch:1:3}
echo "Adding documentation for ${version}"
yarn docusaurus docs:version "${version}"
else
echo "Warning: branch $(branch) does not contain a docusaurus.config.js!"
fi
fi
done

View File

@ -35,6 +35,16 @@ const config = {
docs: {
routeBasePath: "/",
sidebarPath: require.resolve('./sidebars.js'),
lastVersion: '2.5',
includeCurrentVersion: false,
versions: {
'2.5': {
banner: 'none'
},
'2.6': {
banner: 'none'
},
}
},
theme: {
customCss: require.resolve('./src/css/custom.css'),