Skip to content

Commit a2c6745

Browse files
Add versioned docs to build-docs task (#7413)
* add launchpad & master versioned doc-builds * Update Makefile Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
1 parent d917520 commit a2c6745

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Makefile

+8-5
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,14 @@ godocs:
201201

202202
build-docs:
203203
@cd docs && \
204-
while read p; do \
205-
(git checkout $${p} && npm install && VUEPRESS_BASE="/$${p}/" npm run build) ; \
206-
mkdir -p ~/output/$${p} ; \
207-
cp -r .vuepress/dist/* ~/output/$${p}/ ; \
208-
cp ~/output/$${p}/index.html ~/output ; \
204+
while read -a p; do \
205+
branch=$${p[0]} ; \
206+
path_prefix=$${p[1]} ; \
207+
(git checkout $${branch} && npm install && VUEPRESS_BASE="/$${path_prefix}/" npm run build) ; \
208+
mkdir -p ~/output/$${path_prefix} ; \
209+
cp -r .vuepress/dist/* ~/output/$${path_prefix}/ ; \
210+
# Note: the last entry inside the `versions` file will be the default root index.html.
211+
cp ~/output/$${path_prefix}/index.html ~/output ; \
209212
done < versions ;
210213

211214
sync-docs:

docs/versions

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
master
1+
master master
2+
launchpad/backports v0.39

0 commit comments

Comments
 (0)