add deploy.sh (tar + scp to devone)

This commit is contained in:
2026-05-29 16:55:33 +07:00
parent f32abf2127
commit c36fcca0d8

17
deploy.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail
ARCHIVE="/tmp/scm-slicing-$(date +%Y%m%d-%H%M%S).tar.gz"
DEST="devone:~/project/one/supply-chain-management"
echo "Creating archive..."
tar -czf "$ARCHIVE" --exclude='.git' --exclude='.gitignore' .
echo "Uploading to $DEST..."
scp "$ARCHIVE" "$DEST"
echo "Extracting on remote..."
ssh devone "cd ~/project/one/supply-chain-management && tar -xzf $(basename "$ARCHIVE") && rm $(basename "$ARCHIVE")"
rm "$ARCHIVE"
echo "Deploy complete."