diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ee253d4f..c008f98f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,8 +18,7 @@ jobs: run: | sudo sh -c "echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections" sudo apt-get update && sudo apt-get install -y calibre msttcorefonts - npm install gitbook-cli -g - gitbook fetch 3.2.3 && npm i npm@3.10.10 --prefix=~/.gitbook/versions/3.2.3/ # fixing https://travis-ci.org/github/CopterExpress/clover/jobs/766541125#L932 + builder/assets/install_gitbook.sh npm install markdownlint-cli -g npm install svgexport -g gitbook -V diff --git a/builder/assets/install_gitbook.sh b/builder/assets/install_gitbook.sh new file mode 100755 index 00000000..093af6a4 --- /dev/null +++ b/builder/assets/install_gitbook.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# GitBook CLI is deprecated, its installation is broken. +# This script fixes it until we stop using GitBook. + +export NPM_CONFIG_UNSAFE_PERM=1 + +npm install gitbook-cli -g +gitbook fetch 3.2.3 && npm i npm@3.10.10 --prefix=~/.gitbook/versions/3.2.3/ # fixing https://travis-ci.org/github/CopterExpress/clover/jobs/766541125#L932 diff --git a/builder/image-ros.sh b/builder/image-ros.sh index 614e269d..9579f8ea 100755 --- a/builder/image-ros.sh +++ b/builder/image-ros.sh @@ -122,9 +122,8 @@ rm -rf build # remove build artifacts echo_stamp "Build Clover documentation" cd /home/pi/catkin_ws/src/clover -NPM_CONFIG_UNSAFE_PERM=true npm install gitbook-cli -g -NPM_CONFIG_UNSAFE_PERM=true gitbook fetch 3.2.3 && npm i npm@3.10.10 --prefix=~/.gitbook/versions/3.2.3/ # fixing https://travis-ci.org/github/CopterExpress/clover/jobs/766541125#L932 -NPM_CONFIG_UNSAFE_PERM=true gitbook install +builder/assets/install_gitbook.sh +gitbook install gitbook build touch node_modules/CATKIN_IGNORE docs/CATKIN_IGNORE _book/CATKIN_IGNORE clover/www/CATKIN_IGNORE apps/CATKIN_IGNORE # ignore documentation files by catkin