From 990fab02ff375de41b8330ed46ff024e6a0ddc16 Mon Sep 17 00:00:00 2001 From: Christopher Angelo Date: Fri, 30 Jan 2026 04:10:03 +0700 Subject: [PATCH] we now have a deploy script its in bash, i don't really like it but this will do for now --- package.json | 3 ++- scripts/deploy.sh | 20 ++++++++++++++++++++ src/scripts/deploy.ts | 0 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100755 scripts/deploy.sh delete mode 100644 src/scripts/deploy.ts diff --git a/package.json b/package.json index 69bb97f..b8f3677 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "dev": "astro dev", "build": "astro build", "preview": "astro preview", - "astro": "astro" + "astro": "astro", + "deploy": "./scripts/deploy.sh" }, "dependencies": { "@tailwindcss/vite": "^4.1.18", diff --git a/scripts/deploy.sh b/scripts/deploy.sh new file mode 100755 index 0000000..5363dc9 --- /dev/null +++ b/scripts/deploy.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +echo "$PWD" +if [ ! -d "dist" ]; then + echo "Build doesn't seem to exist. Please run \`pnpm build\` then re-run the deployment script!" + exit 1 +fi + +echo "Running deployment..." +echo "" +echo "-- 1. Deleting prev. files..." +ssh -t root@rprox -- rm -r "/var/www/links.angelo.fyi/" + +echo "" +echo "-- 2. Uploading new build..." +scp -r "./dist" "root@rprox:/var/www/links.angelo.fyi" + +echo "" +echo "Done!" +exit 0 diff --git a/src/scripts/deploy.ts b/src/scripts/deploy.ts deleted file mode 100644 index e69de29..0000000 -- 2.51.2