Skip to content

Commit c39a1f4

Browse files
committed
feat: add mise deploy task for bigblack deployment
Single command `mise run deploy` that builds TypeScript locally, rsyncs to bigblack (excluding .env to protect secrets), and restarts the systemd service.
1 parent a548761 commit c39a1f4

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

.mise.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tools]
2+
node = "22"

.mise/tasks/deploy

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
#MISE description="Build locally and deploy to bigblack via rsync + systemd restart"
3+
set -euo pipefail
4+
5+
REMOTE="bigblack"
6+
REMOTE_DIR="~/fork-tools/nanoclaw"
7+
8+
echo "→ Building TypeScript..."
9+
npx tsc
10+
11+
echo "→ Syncing source to ${REMOTE}..."
12+
rsync -avz \
13+
--exclude='node_modules' \
14+
--exclude='.git' \
15+
--exclude='.env' \
16+
--exclude='dist' \
17+
. "${REMOTE}:${REMOTE_DIR}/"
18+
19+
echo "→ Syncing dist/ to ${REMOTE}..."
20+
rsync -avz dist/ "${REMOTE}:${REMOTE_DIR}/dist/"
21+
22+
echo "→ Restarting nanoclaw service on ${REMOTE}..."
23+
ssh "${REMOTE}" 'systemctl --user restart nanoclaw && sleep 3 && systemctl --user status nanoclaw' 2>&1
24+
25+
echo ""
26+
echo "✓ Deployed and restarted on ${REMOTE}"

0 commit comments

Comments
 (0)