diff --git a/tools/publishdocs.sh b/tools/publishdocs.sh index 47fbf37857..9e6dfe751a 100755 --- a/tools/publishdocs.sh +++ b/tools/publishdocs.sh @@ -50,9 +50,18 @@ done # Build the www pages so that openstack-doc-test creates a link to # www/www-index.html. -python tools/www-generator.py --source-directory www/ --output-directory publish-docs/ -rsync -a www/static/ publish-docs/ +if [ "$PUBLISH" = "build" ] ; then + python tools/www-generator.py --source-directory www/ \ + --output-directory publish-docs/www/ + rsync -a www/static/ publish-docs/www/ + # publish-docs/www-index.html is the trigger for openstack-doc-test + # to include the file. + mv publish-docs/www/www-index.html publish-docs/www-index.html +fi if [ "$PUBLISH" = "publish" ] ; then + python tools/www-generator.py --source-directory www/ \ + --output-directory publish-docs + rsync -a www/static/ publish-docs/ # Don't publish this file rm publish-docs/www-index.html fi