Commit e9edfc0c authored by Laura Kalbag's avatar Laura Kalbag 😴

Update deploy script for new Site.js capabilities. Remove no-longer-needed...

Update deploy script for new Site.js capabilities. Remove no-longer-needed develop and stage scripts
parent 2cf46ec3
#!/bin/bash
hugo --baseURL=https://laurakalbag.com --destination=public
site public --sync-to=laura@laurakalbag.com:site --exit-on-sync
site --sync-to=laura@laurakalbag.com:site --exit-on-sync
#!/bin/bash
# Runs Hugo server to watch for changes and compile the public folder
# and Site.js to serve the generated public folder.
# Make errors cause the script to exit.
set -e
echo ""
echo " 😎 laurakalbag.com : development."
echo ""
# Start Hugo server.
#
# The baseURL and appendPort flags are set to overwrite the default behaviour
# of Hugo when run with the server option which is to write absolute URLs
# as localhost:<port> regardless of the setting of baseURL in the config.toml
# file. Since we do not have a separate build/deploy phase to the live server,
# we want the site as it would exist on the server to exist on the client.
# We also disable Hugo’s live reload as Site.js’s own live reload (based on
# Server-Sent Events) will kick in while serving the public directory.
hugo server --buildDrafts --renderToDisk --baseURL=https://localhost --disableLiveReload --appendPort=false &
echo " 😎 ✔ Hugo server is running and watching for changes."
# Use Site.js to serve the generated public folder.
site public
#!/bin/bash
# Start Hugo server.
#
# The baseURL and appendPort flags are set to overwrite the default behaviour
# of Hugo when run with the server option which is to write absolute URLs
# as localhost:<port> regardless of the setting of baseURL in the config.toml
# file. Since we do not have a separate build/deploy phase to the live server,
# we want the site as it would exist on the server to exist on the client.
hugo server --buildDrafts --renderToDisk --baseURL=https://laurakalbag.com --liveReloadPort=443 --appendPort=false &
HUGO_SERVER_PID=$!
# Use Site.js as a reverse proxy to serve the site at https://hostname
# (Use ngrok to expose publicly.)
site :1313 @hostname
# Clean up: kill the Hugo server before exiting.
kill $HUGO_SERVER_PID
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment