Website Summary Files Commits Branches @commit @diff @stats
path: root / website / publish.sh
blob: 5959fe95926b896619c4134a911bf5451b1d942a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/sh

set -e

commit=`git log -n1 --format=%H`


# Be sure that we are up-to-date
pushd public
git pull --ff-only
popd

rm -rf public/*

hugo --minify

pushd public

git add --all .
git commit -m "Published from $commit"
git push

popd