Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion skills/sth/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ This script:
- otherwise clones or updates `sun-praise/static-html`
- builds `dist/sth` when the Go source fingerprint changes

2. Start the preview server:
2. Start the preview server **only if not already running**:

If `STATIC_HTML_SERVER_URL` is set (e.g. the server is already deployed elsewhere), skip this step entirely.

Otherwise start locally:

```bash
bash scripts/start-server.sh [port]
Expand Down
6 changes: 6 additions & 0 deletions skills/sth/scripts/start-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

set -euo pipefail

# If an external server is already configured, skip starting a local one.
if [ -n "${STATIC_HTML_SERVER_URL:-}" ]; then
echo "STATIC_HTML_SERVER_URL is set ($STATIC_HTML_SERVER_URL) — skipping server start." >&2
exit 0
fi

script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
repo_dir="$("$script_dir/bootstrap-repo.sh")"
host="${STATIC_HTML_HOST:-0.0.0.0}"
Expand Down
Loading