build.sh: move doc build before proto & libs