18 lines
635 B
Bash
Executable file
18 lines
635 B
Bash
Executable file
#!/bin/bash
|
|
# This script builds the documentation site using MkDocs and serves it to the Caddy web server.
|
|
|
|
# Build the documentation site
|
|
echo "Building documentation site..."
|
|
rm -rf ./site
|
|
mkdocs build --clean
|
|
|
|
# Collect ssh password
|
|
echo "Enter SSH password for cory@10.10.10.40:"
|
|
read -s SSH_PASSWORD
|
|
echo "Thank you! Your password has been securely collected."
|
|
|
|
# Clean up the web server directory
|
|
sshpass -p "$SSH_PASSWORD" ssh cory@10.10.10.40 'sudo rm -rf /var/caddy/docs.bsct.io/www/*'
|
|
|
|
# Copy the built documentation to the web server
|
|
sshpass -p "$SSH_PASSWORD" scp -r ./site/* cory@10.10.10.40:/var/caddy/docs.bsct.io/www/
|