forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apacheGH-41430: [Docs] Use sphinxcontrib-mermaid instead of generatin…
…g images from .mmd (apache#41455) ### Rationale for this change This is for easy to maintain. ### What changes are included in this PR? * Install sphinxcontrib-mermaid * Install Chromium to generate SVG from .mmd * Use Debian instead of Ubuntu for building docs because Ubuntu provides Chromium only via snap * Use a normal user not root to build documents because Mermaid require additional `--no-sandbox` argument when we use root ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#41430 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
- Loading branch information
Showing
37 changed files
with
210 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ on: | |
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
ARCHERY_DEBUG: 1 | ||
ARCHERY_USE_DOCKER_CLI: 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,16 @@ build_dir=${2} | |
|
||
: ${BUILD_DOCS_JS:=OFF} | ||
|
||
pushd ${source_dir} | ||
# https://github.com/apache/arrow/issues/41429 | ||
# TODO: We want to out-of-source build. This is a workaround. We copy | ||
# all needed files to the build directory from the source directory | ||
# and build in the build directory. | ||
rm -rf ${build_dir}/js | ||
mkdir -p ${build_dir} | ||
cp -aL ${arrow_dir}/LICENSE.txt ${build_dir}/ | ||
cp -aL ${arrow_dir}/NOTICE.txt ${build_dir}/ | ||
cp -aL ${source_dir} ${build_dir}/js | ||
pushd ${build_dir}/js | ||
|
||
yarn --immutable | ||
yarn lint:ci | ||
|
@@ -34,18 +43,18 @@ yarn build | |
if [ "${BUILD_DOCS_JS}" == "ON" ]; then | ||
# If apache or upstream are defined use those as remote. | ||
# Otherwise use origin which could be a fork on PRs. | ||
if [ "$(git config --get remote.apache.url)" == "[email protected]:apache/arrow.git" ]; then | ||
if [ "$(git -C ${arrow_dir} config --get remote.apache.url)" == "[email protected]:apache/arrow.git" ]; then | ||
yarn doc --gitRemote apache | ||
elif [[ "$(git config --get remote.upstream.url)" =~ "https://github.com/apache/arrow" ]]; then | ||
elif [[ "$(git -C ${arrow_dir}config --get remote.upstream.url)" =~ "https://github.com/apache/arrow" ]]; then | ||
yarn doc --gitRemote upstream | ||
elif [[ "$(basename -s .git $(git config --get remote.origin.url))" == "arrow" ]]; then | ||
elif [[ "$(basename -s .git $(git -C ${arrow_dir} config --get remote.origin.url))" == "arrow" ]]; then | ||
yarn doc | ||
else | ||
echo "Failed to build docs because the remote is not set correctly. Please set the origin or upstream remote to https://github.com/apache/arrow.git or the apache remote to [email protected]:apache/arrow.git." | ||
exit 0 | ||
fi | ||
mkdir -p ${build_dir}/docs/js | ||
rsync -a ${arrow_dir}/js/doc/ ${build_dir}/docs/js | ||
rsync -a doc/ ${build_dir}/docs/js | ||
fi | ||
|
||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.