This commit is contained in:
@@ -41,14 +41,16 @@ jobs:
|
||||
# Reset any local changes (e.g., package-lock.json, build artifacts) and sync to origin/main
|
||||
git fetch --prune origin
|
||||
git reset --hard origin/main
|
||||
git clean -fdx
|
||||
git clean -fdx -e .env -e .env.*
|
||||
# Install Node.js deps and build without modifying lockfile
|
||||
"$NPM" ci --no-audit --no-fund
|
||||
"$NPM" run build
|
||||
# Ensure systemd service exists and restart
|
||||
sudo -n systemctl restart train-id
|
||||
if systemctl list-unit-files | grep -q "${SERVICE}.service"; then
|
||||
sudo systemctl restart "$SERVICE"
|
||||
else
|
||||
sudo systemctl start "$SERVICE"
|
||||
echo "Warning: ${SERVICE}.service not found; start your process manager manually."
|
||||
fi
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user