adjust docs build steps in makefile (#10727)

This commit is contained in:
Ibo Sy 2021-12-12 19:07:53 +01:00 committed by GitHub
parent 78e98a60c4
commit 52f6fc29da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -184,11 +184,13 @@ godocs:
build-docs: build-docs:
@cd docs && \ @cd docs && \
while read -r branch path_prefix; do \ while read -r branch path_prefix; do \
(git checkout $${branch} && npm install && VUEPRESS_BASE="/$${path_prefix}/" npm run build) ; \ echo "building branch $${branch}" ; \
(git clean -fdx && git reset --hard && git checkout $${branch} && npm install && VUEPRESS_BASE="/$${path_prefix}/" npm run build) ; \
mkdir -p ~/output/$${path_prefix} ; \ mkdir -p ~/output/$${path_prefix} ; \
cp -r .vuepress/dist/* ~/output/$${path_prefix}/ ; \ cp -r .vuepress/dist/* ~/output/$${path_prefix}/ ; \
cp ~/output/$${path_prefix}/index.html ~/output ; \ cp ~/output/$${path_prefix}/index.html ~/output ; \
done < versions ; done < versions ;
.PHONY: build-docs .PHONY: build-docs
############################################################################### ###############################################################################