Add a deploy script and npm commands, and include Navbar updates as requested. Signed-off-by: codex@lucy.xalior.com
20 lines
482 B
Bash
Executable File
20 lines
482 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
deploy_branch="${1:-deploy}"
|
|
current_branch="$(git rev-parse --abbrev-ref HEAD)"
|
|
|
|
if ! git diff --quiet || ! git diff --cached --quiet; then
|
|
echo "Working tree is not clean. Commit or stash changes before deploy."
|
|
exit 1
|
|
fi
|
|
|
|
cleanup() {
|
|
git checkout "${current_branch}" >/dev/null 2>&1 || true
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
git checkout "${deploy_branch}"
|
|
git merge --no-edit "${current_branch}"
|
|
git push explorer.specnext.dev "${deploy_branch}"
|