build
This commit is contained in:
parent
00424e7cda
commit
5c8e355e1a
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
site/
|
||||
23
build-webapp.sh
Executable file
23
build-webapp.sh
Executable file
@ -0,0 +1,23 @@
|
||||
PKG_DIR="."
|
||||
OUTPUT_DIR="${PKG_DIR}/site"
|
||||
DEST_DIR=${1:-/data}
|
||||
|
||||
if [[ -d "$DEST_DIR" ]]; then
|
||||
echo "${DEST_DIR} already exists." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install mkdocs and dependencies
|
||||
apt-get update
|
||||
apt-get install -y python3-pip
|
||||
|
||||
pip3 install mkdocs mkdocs-material || exit 1
|
||||
|
||||
mkdocs build || exit 1
|
||||
|
||||
if [[ ! -d "$OUTPUT_DIR" ]]; then
|
||||
echo "Missing output directory: $OUTPUT_DIR" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mv "$OUTPUT_DIR" "$DEST_DIR"
|
||||
Loading…
Reference in New Issue
Block a user