forked from finos/legend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-site.sh
executable file
·63 lines (53 loc) · 1.44 KB
/
build-site.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
# Define which models to embed in the site. Blank for now
export LEGEND_MODELS=""
# Where the model MD files will be checked out
export DOCS_FOLDER=${PWD}/docs/models
# Import docs from modeling projects in gitlab.com/finos-foundation
cd /tmp
mkdir -p ${DOCS_FOLDER}
for LEGEND_MODEL in ${LEGEND_MODELS}
do
rm -rf ${LEGEND_MODEL}
git clone https://gitlab.com/finosfoundation/${LEGEND_MODEL}.git
mkdir -p ${DOCS_FOLDER}/${LEGEND_MODEL}
cp -Rf ${LEGEND_MODEL}/docs/* ${DOCS_FOLDER}/${LEGEND_MODEL}
done
cd -
# Create contribute.md docs page, from CONTRIBUTING.md
# CONTRIB_MD_PATH=docs/contribute.md
# if [ -f "CONTRIBUTING.md" ]; then
# rm -rf $CONTRIB_MD_PATH
# touch $CONTRIB_MD_PATH
# cat <<EOT >> $CONTRIB_MD_PATH
# ---
# id: contribute
# title: Contributing to Alloy
# sidebar_label: Contribute
# ---
# EOT
# Remove title (first line) from MD file content
# sed 1d .github/CONTRIBUTING.md >> $CONTRIB_MD_PATH
# fi
# Create roadmap.md docs page, from .github/ROADMAP.md
# ROADMAP_MD_PATH=docs/roadmap.md
# if [ -f ".github/ROADMAP.md" ]; then
# rm -rf $ROADMAP_MD_PATH
# touch $ROADMAP_MD_PATH
# cat <<EOT >> $ROADMAP_MD_PATH
# ---
# id: roadmap
# title: Alloy Roadmap
# sidebar_label: Roadmap
# ---
# EOT
# Remove title (first line) from MD file content
# sed 1d .github/ROADMAP.md >> $ROADMAP_MD_PATH
# fi
# Where the docusaurus app lives
cd website
# Install docusaurus deps
yarn install
# Build Docusaurus site
yarn build
cd -