noninteractive and not home killing
parent
e3e14d6ed0
commit
41cee6f459
|
|
@ -30,16 +30,18 @@ cd $outdir
|
|||
|
||||
(
|
||||
set -ueo pipefail
|
||||
if ! tty; then
|
||||
printf "https://gitlab%40breel.dev:%s@gitlab.com\n" "$GITLAB_PAT" > "$HOME/.git-credentials"
|
||||
if [ -n "$GITLAB_PAT" ]; then
|
||||
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
|
||||
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
|
||||
|
||||
(
|
||||
|
|
|
|||
Loading…
Reference in New Issue