noninteractive and not home killing

main
bel 2023-10-14 20:30:59 -06:00
parent e3e14d6ed0
commit 41cee6f459
1 changed files with 11 additions and 9 deletions

View File

@ -30,16 +30,18 @@ cd $outdir
( (
set -ueo pipefail set -ueo pipefail
if ! tty; then if [ -n "$GITLAB_PAT" ]; then
printf "https://gitlab%40breel.dev:%s@gitlab.com\n" "$GITLAB_PAT" > "$HOME/.git-credentials" export HOME="$(mktemp -d)"
git clone https://gitlab%40breel.dev:"$GITLAB_PAT"@gitlab.com/breel/resume.git gitlab-resume.d
git config --global user.name "gitlab@breel.dev"
git config --global user.email "gitlab@breel.dev"
rm -rf ./gitlab-resume.d/*
cp -r ./public/* ./gitlab-resume.d/
cd ./gitlab-resume.d/
git add -A :/
git commit -m "$(date -u +%Y-%m-%dT%H:%M:%S)"
git push origin main
fi fi
git clone https://gitlab.com/breel/resume.git gitlab-resume.d
rm -rf ./gitlab-resume.d/*
cp -r ./public/* ./gitlab-resume.d/
cd ./gitlab-resume.d/
git add -A :/
git commit -m "$(date -u +%Y-%m-%dT%H:%M:%S)"
git push origin main
) || true ) || true
( (