aboutsummaryrefslogtreecommitdiff
path: root/deploy.sh
blob: d66afa0ae284bc1f44c67af3a1d9d1355df09447 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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