Updated user and added section for collecting user password
This commit is contained in:
parent
08a216b90f
commit
4295b9448b
1 changed files with 8 additions and 2 deletions
10
build.sh
10
build.sh
|
|
@ -2,11 +2,17 @@
|
||||||
# This script builds the documentation site using MkDocs and serves it to the Caddy web server.
|
# This script builds the documentation site using MkDocs and serves it to the Caddy web server.
|
||||||
|
|
||||||
# Build the documentation site
|
# Build the documentation site
|
||||||
|
echo "Building documentation site..."
|
||||||
rm -rf ./site
|
rm -rf ./site
|
||||||
mkdocs build --clean
|
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
|
# Clean up the web server directory
|
||||||
ssh webmaster@10.10.10.40 'sudo rm -rf /usr/share/caddy/docs.bsct.me/*'
|
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
|
# Copy the built documentation to the web server
|
||||||
scp -r ./site/* webmaster@10.10.10.40:/usr/share/caddy/docs.bsct.me
|
sshpass -p "$SSH_PASSWORD" scp -r ./site/* cory@10.10.10.40:/var/caddy/docs.bsct.io/www/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue