summaryrefslogtreecommitdiff
path: root/deploy_static
blob: 4cadea955efbaeff55eaba0bd17fd3dfdb546f71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash -x

set -o errexit

remote=www-data@grapheneos.org
current=$(ssh $remote readlink html)

if [[ $current = html_a ]]; then
    target=html_b
else
    target=html_a
fi

ssh $remote rm -rf $target
scp -r static $remote:$target
ssh $remote chmod -R a+rX $target
ssh $remote ln -snf $target html