Skip to content

Commit

Permalink
Deployed f3d620b to main with MkDocs 1.6.1 and mike 2.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ci-bot committed Nov 26, 2024
1 parent 3fe16d4 commit b702dd9
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions main/entrypoints/setup_git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,21 @@

[ -e ".finished" ] && return 0

apk update && apk add git

git remote || INIT=true
ls .git && return 0

echo "${GITHUB_REPO}" | grep -q "#" && TAG="${GITHUB_REPO#*#}" || TAG=

if [ "${INIT}" ]
apk update && apk add git
git init
chown -R "$(find . -maxdepth 1 -exec ls -ld {} + | awk '{print $3":"$4}' | tail -n1)" .git
git config --global --add safe.directory "${PWD}"
REPO="${GITHUB_REPO%%#*}"
git remote add origin "${REPO}"
git fetch
DEFAULT_BRANCH=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')
git reset --hard origin/"${DEFAULT_BRANCH}"
git clean -fd
if [ -n "${TAG}" ]
then
git init
chown -R "$(find . -maxdepth 1 -exec ls -ld {} + | awk '{print $3":"$4}' | tail -n1)" .git
git config --global --add safe.directory "${PWD}"
REPO="${GITHUB_REPO%%#*}"
git remote add origin "${REPO}"
git fetch
DEFAULT_BRANCH=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')
git reset --hard origin/"${DEFAULT_BRANCH}"
git clean -fd
if [ -n "${TAG}" ]
then
git checkout "${TAG}"
fi
git checkout "${TAG}"
fi

0 comments on commit b702dd9

Please sign in to comment.