feat!: Separate www into www/blog and www/private
All checks were successful
CI / build (push) Successful in 5s
All checks were successful
CI / build (push) Successful in 5s
Now the private content is stored as a git submodule. This means I can keep that repo's source private, but still use it in the build product. The build product (website) relies on HTTP basic authentication, so access control is maintained throughout the SDLC.
This commit is contained in:
parent
60d8788ffa
commit
ed22dbb4b8
113 changed files with 3819 additions and 50 deletions
27
deploy.sh
27
deploy.sh
|
|
@ -17,15 +17,25 @@ CMD=$1
|
|||
case $CMD in
|
||||
build)
|
||||
printf "Building blog with mdbook...\n"
|
||||
[ -s src ] || ln -s /var/lib/www src
|
||||
mdbook build
|
||||
printf "✓ Build complete!\n"
|
||||
;;
|
||||
|
||||
local)
|
||||
printf "Deploying locally to production path...\n"
|
||||
|
||||
LOCAL_PATH="/srv/www/binning.net"
|
||||
|
||||
printf "Deploying website files...\n"
|
||||
rsync -av --delete blog/ ${LOCAL_PATH}/
|
||||
|
||||
printf "✓ Local deployment complete!\n Run any webserver with the webroot at : %s\n" "${LOCAL_PATH}"
|
||||
;;
|
||||
|
||||
staging)
|
||||
printf "Deploying to STAGING environment...\n"
|
||||
|
||||
STAGING_PATH="/srv/www/stage.binning.net"
|
||||
STAGING_PATH="/srv/www/stage"
|
||||
|
||||
sudo mkdir -p ${STAGING_PATH}
|
||||
|
||||
|
|
@ -34,7 +44,7 @@ case $CMD in
|
|||
|
||||
sudo chown -R nginx:nginx ${STAGING_PATH}/
|
||||
|
||||
printf "✓ Staging deployment complete!\n Files deployed to: %s\n\nTo activate nginx, import staging.nginx.nix into your local NixOS config\nand run: sudo nixos-rebuild switch\n" "${STAGING_PATH}"
|
||||
printf "✓ Staging deployment complete!\n See stage.local:8080 %s\n" "${STAGING_PATH}"
|
||||
;;
|
||||
|
||||
prod)
|
||||
|
|
@ -58,17 +68,6 @@ case $CMD in
|
|||
printf "✓ Production deployment complete!\n\nNginx configuration is managed by the nixos-config flake (hosts/crossbox/nginx.nix).\n"
|
||||
;;
|
||||
|
||||
local)
|
||||
printf "Deploying locally to production path...\n"
|
||||
|
||||
LOCAL_PATH="/srv/www/binning.net"
|
||||
|
||||
printf "Deploying website files...\n"
|
||||
rsync -av --delete blog/ ${LOCAL_PATH}/
|
||||
|
||||
printf "✓ Local deployment complete!\n Files deployed to: %s\n" "${LOCAL_PATH}"
|
||||
;;
|
||||
|
||||
*)
|
||||
printf "Error: Invalid command '%s'\n" "$CMD"
|
||||
usage
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue