mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-25 01:44:43 +01:00
28 lines
593 B
Bash
Executable File
28 lines
593 B
Bash
Executable File
#!/bin/bash
|
|
set -eo pipefail
|
|
|
|
GHPAGESREPO="git@github.com:zrepl/zrepl.github.io.git"
|
|
|
|
exit_msg() {
|
|
echo "error, exiting..."
|
|
}
|
|
trap exit_msg EXIT
|
|
|
|
echo -n "PRESS ENTER to confirm you commited the docs changes to the zrepl repo"
|
|
read
|
|
|
|
cd public
|
|
echo "verify we're in the GitHub pages repo..."
|
|
git remote get-url origin | grep -E "^${GHPAGESREPO}\$"
|
|
echo "cleaning GitHub pages repo"
|
|
git clean -dn
|
|
cd ..
|
|
echo "building site"
|
|
hugo
|
|
cd public
|
|
echo "adding and commiting all changes in GitHub pages repo"
|
|
git add -A
|
|
git commit -m "hugo render from publish.sh - `date -u`"
|
|
git push origin master
|
|
|