-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcppalliance_mrdocs_build.sh
executable file
·35 lines (31 loc) · 1.23 KB
/
cppalliance_mrdocs_build.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
27
28
29
30
31
32
33
34
35
#!/bin/bash
set -xe
mkdir -p ~/.nvm_${REPONAME}_antora
export NODE_VERSION=18.18.1
# The container has a pre-installed nodejs. Overwrite those again.
export NVM_BIN="$HOME/.nvm_${REPONAME}_antora/versions/node/v18.18.1/bin"
export NVM_DIR=$HOME/.nvm_${REPONAME}_antora
export NVM_INC=$HOME/.nvm_${REPONAME}_antora/versions/node/v18.18.1/include/node
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
export NVM_DIR=$HOME/.nvm_${REPONAME}_antora
. "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
. "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
. "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
export PATH="$HOME/.nvm_${REPONAME}_antora/versions/node/v${NODE_VERSION}/bin/:${PATH}"
node --version
npm --version
npm install [email protected]
npm install @mermaid-js/[email protected]
# 2025-01-25
cd docs/ui
npm ci
npx gulp lint
npx gulp
cd ../..
cd docs
npm ci
# While official docs may use "npx antora antora-playbook.yml", it seems that fetches from develop or master.
# In the case of PRs, the local version should be used instead.
# npx antora local-antora-playbook.yml
# npx antora --log-level debug antora-playbook.yml --attribute branchesarray=HEAD
npx antora antora-playbook.yml --attribute branchesarray=HEAD