From a37b8e68d373c9b634151dff660a654512c9db21 Mon Sep 17 00:00:00 2001 From: Nick Stokoe Date: Tue, 9 May 2023 15:42:59 +0100 Subject: [PATCH] package.json - add build and deploy scripts bin/deploy wraps the rsync command. --- bin/deploy | 8 ++++++++ package.json | 2 ++ 2 files changed, 10 insertions(+) create mode 100755 bin/deploy diff --git a/bin/deploy b/bin/deploy new file mode 100755 index 0000000..2318961 --- /dev/null +++ b/bin/deploy @@ -0,0 +1,8 @@ +#!/bin/bash +set -vx +rsync -avzc \ + --delete \ + -C \ + _site/ \ + -- \ + "$1" diff --git a/package.json b/package.json index 60d061a..4941712 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,8 @@ "description": "", "main": "index.js", "scripts": { + "build": "rm -rf _site && eleventy --pathprefix '~nick/whenwe/'", + "deploy": "bin/deploy nick@mixian.noodlefactory.co.uk:public_html/whenwe/", "server": "eleventy --serve", "test": "echo \"Error: no test specified\" && exit 1" },