aboutsummaryrefslogtreecommitdiff
path: root/scripts/build
blob: 0a5e246e9cc55bc68c7c7cd9b17fd9ce7ab5cec4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

web_root=/var/www/blog

cd $(dirname $0)

echo "-> generating posts.json..."
./genposts

cd ..

echo "-> building static files..."
npx next build

echo "-> exporting static files..."
npx next export

echo "-> generating atom.xml..."
./rss/genrss

echo "-> cleaning $web_root..."
rm -rf $web_root/*

echo "-> moving static files to $web_root..."
cp -rv out/* $web_root

echo "-> cleaning out directory..."
rm -rfv out