mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 13:04:23 +00:00
Made a really basic script that runs the vitepress proccess.
This commit is contained in:
parent
7b46cc7e6f
commit
5c64ae08bf
10 changed files with 309 additions and 17 deletions
31
build_docs.sh
Executable file
31
build_docs.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
ask_yes_no() {
|
||||
while true; do
|
||||
read -p "$1 (y/n): " answer
|
||||
case ${answer:0:1} in
|
||||
y|Y ) return 0 ;;
|
||||
n|N ) return 1 ;;
|
||||
* ) echo "Please answer yes or no.";;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
if ask_yes_no "Are you ABSOLUTELY in the root dir of the app?"; then
|
||||
echo "Proceeding with build..."
|
||||
cd ./docs/
|
||||
if ask_yes_no "Have you installed vitepress before?"; then
|
||||
echo "Skipping"
|
||||
else
|
||||
echo "Installing vitepress with bun..."
|
||||
bun add -D vitepress
|
||||
fi
|
||||
bunx vitepress build
|
||||
cd ..
|
||||
cp -R ./docs/.vitepress/dist/ ./public/docs/
|
||||
echo "Done :)"
|
||||
exit 1
|
||||
else
|
||||
echo "Please navigate to the root directory and try again."
|
||||
exit 1
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue