fix initial deployment

This commit is contained in:
cuqmbr 2024-12-12 11:53:52 +02:00
parent 650e4826bf
commit 32c44514f6
Signed by: cuqmbr
GPG Key ID: 0AA446880C766199

View File

@ -34,14 +34,20 @@ deploy() {
ln -snfv ${GIT_REPO_PATH}/public ${DEPLOY_PATH}
}
# Initial deployment
if [ ! -d ${GIT_REPO_PATH} ]; then
git clone --recurse-submodules 'https://gitea.cuqmbr.xyz/cuqmbr/cuqmbr.xyz.git' ${GIT_REPO_PATH}
cd ${GIT_REPO_PATH}
build
deploy
exit 0
fi
start_dir=$(pwd)
# Periodic updates
cd ${GIT_REPO_PATH}
git remote update
@ -54,5 +60,3 @@ if [ "$LOCAL_COMMIT" != "$REMOTE_COMMIT" ]; then
build
deploy
fi
cd "${start_dir}"