neilhanlon.me/deploy.sh
Neil Hanlon 6b05a717b8
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
actually use the ssh url though
2022-11-12 07:52:50 -05:00

29 lines
577 B
Bash

#!/bin/bash -ex
export GIT_AUTHOR_NAME="${GIT_AUTHOR_NAME}"
export GIT_AUTHOR_EMAIL="${GIT_AUTHOR_EMAIL}"
REMOTE="${PUSH_REMOTE:-git@git.shrug.pw:neil/neilhanlon.me.git}"
rm -fr pages.git
mkdir pages.git
( cd pages.git && git init -b pages )
rsync -av public/* pages.git
cat << EOF > pages.git/.domains
neilhanlon.me
neilhanlon.com
hanlon.ninja
thepotato.tech
EOF
cd pages.git
git config user.name "$GIT_AUTHOR_NAME"
git config user.email "$GIT_AUTHOR_EMAIL"
git add -A
git commit -m "Deployment at $(date -u -Is)"
git remote add origin $REMOTE
git push -f origin pages