Skip to content

Commit

Permalink
cppalliance/mrdocs (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdarwin authored Dec 17, 2024
1 parent 10ae784 commit b3eeec7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
28 changes: 28 additions & 0 deletions scripts/cppalliance_mrdocs_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/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]

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
5 changes: 5 additions & 0 deletions scripts/cppalliance_mrdocs_prebuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -xe
echo "export PATH_TO_DOCS=docs/build/site" >> jenkinsjobinfo.sh
echo "export PRTEST=prtest2" >> jenkinsjobinfo.sh

0 comments on commit b3eeec7

Please sign in to comment.