mfashby.net

Website mfashby.net
git clone git://code.mfashby.net:/mfashby.net
Log | Files | Refs | Submodules | README

commit fd330cb15d5247a467d086d9b227b56ab4bd2879
parent aebf70ed75dbbe1fbbf0f72f7d9f94f08aab0ed5
Author: Martin Ashby <martin@ashbysoft.com>
Date:   Fri, 30 Dec 2022 17:39:41 +0000

Rename refresh.sh -> deploy.sh
Add step to stop comments app before copying new binary

Diffstat:
Adeploy.sh | 18++++++++++++++++++
Drefresh.sh | 19-------------------
2 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/deploy.sh b/deploy.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +set -e + +# Copy static site +hugo +scp -r public/* root@rpi3:/var/www/mfashby.net/ + +# build & install comments app +pushd comments +RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc" cargo build --target=aarch64-unknown-linux-gnu --release +ssh root@rpi3 -C systemctl stop comments +scp target/aarch64-unknown-linux-gnu/release/comments root@rpi3:/usr/local/bin/comments +scp comments.service root@rpi3:/etc/systemd/system/comments.service +ssh root@rpi3 -C systemctl daemon-reload +ssh root@rpi3 -C systemctl restart comments +popd + diff --git a/refresh.sh b/refresh.sh @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -set -e - -git pull - -# Copy static site -hugo -scp -r public/* root@rpi3:/var/www/mfashby.net/ - -# build & install comments app -pushd comments -RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc" cargo build --target=aarch64-unknown-linux-gnu --release -scp target/aarch64-unknown-linux-gnu/release/comments root@rpi3:/usr/local/bin/comments -scp comments.service root@rpi3:/etc/systemd/system/comments.service -ssh root@rpi3 -C systemctl daemon-reload -ssh root@rpi3 -C systemctl restart comments -popd -