16 lines
303 B
Bash
16 lines
303 B
Bash
#!/bin/bash
|
|
# 日常更新部署
|
|
set -euo pipefail
|
|
|
|
APP_DIR="/var/www/nomadro.com"
|
|
BRANCH="${BRANCH:-test}"
|
|
|
|
cd "$APP_DIR"
|
|
git fetch origin
|
|
git checkout "$BRANCH"
|
|
git pull origin "$BRANCH"
|
|
pnpm install --frozen-lockfile
|
|
pnpm build
|
|
systemctl restart nomadro
|
|
echo "Deployed $(git rev-parse --short HEAD)"
|