aboutsummaryrefslogtreecommitdiff
path: root/deploy.sh
blob: 91e476f3623337bbb924f72a244856bd49f32961 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash

set -e

# Build static site
zig build

# Build comments app
pushd comments
if [ $(uname -m) != "aarch64" ]
then
   echo "must build on aarch64 for now"
   exit
fi
zig build -Doptimize=ReleaseSafe -Dcpu=baseline
popd

# Copy static site
rsync -rz zig-out/* root@rpi3:/var/www/mfashby.net

# Copy comments app
rsync comments/zig-out/bin/comments root@rpi3:/usr/local/bin/comments