aboutsummaryrefslogtreecommitdiff
path: root/deploy
blob: 43c3adf706a5ae7413b0c4ff0189dfd3c790a6e5 (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

# Cleanup
rm -rf public
rm -f static/main.js
rm -f static/main.js.map

# Build JavaScript
tsc --pretty --removeComments --strict --noUnusedLocals --noUnusedParameters --noImplicitReturns main.ts --outFile main-big.js
closure-compiler main-big.js --js_output_file static/main.js
rm main-big.js

# Build site
zola build

# Transfer
rsync -avzh public/ guyonvarch.me:/var/www/cooking.guyonvarch.me --delete