Website Summary Files Commits Branches @commit @diff @stats
path: root / website / publish.sh
blob: cdb9ea4b2c86138c0da42e9b272120d0439d84b4 (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
#!/bin/bash

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