forked from moveit/moveit2_tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtmlproofer.sh
executable file
·26 lines (19 loc) · 1.01 KB
/
htmlproofer.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
set -e
# Define some config vars
export NOKOGIRI_USE_SYSTEM_LIBRARIES=true
export REPOSITORY_NAME=${PWD##*/}
echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME"
# Install htmlpoofer
gem install --user-install html-proofer
PATH="$(ruby -r rubygems -e 'puts Gem.user_dir')/bin:$PATH"
# Install python dependencies
pip3 install --user --upgrade -r requirements.txt
# Clear out any previous builds
rm -rf build
# Test build with non-ROS wrapped Sphinx command to allow warnings and errors to be caught
sphinx-build -W -b html . build
# Run HTML tests on generated build output to check for 404 errors, etc
htmlproofer ./build --only-4xx --check-html --http-status-ignore "429" --file-ignore ./build/genindex.html,./build/search.html --alt-ignore '/.*/' --url-ignore '#' --url-swap 'https\://github.com/ros-planning/moveit2_tutorials/blob/main/:file\://$PWD/build/' --url-swap 'https\://moveit.picknik.ai/rolling:file\://$PWD/build/'
# Tell GitHub Pages (on deploy) to bypass Jekyll processing
touch build/.nojekyll