ci: fix divergent branches (reset --hard)
Some checks failed
Build & Deploy / build (push) Failing after 6s

This commit is contained in:
test
2026-07-19 20:54:29 +08:00
parent 2995439aa4
commit 57d1deb0a1

View File

@@ -20,8 +20,12 @@ jobs:
WORK=/root/.cache/demo-frontend
mkdir -p $WORK
cd $WORK
[ -d .git ] || git clone http://joe:${GITEA_TOKEN}@192.168.1.212:3000/joe/demo-frontend.git .
git pull
if [ -d .git ]; then
git reset --hard origin/main
git clean -fd
else
git clone http://joe:${GITEA_TOKEN}@192.168.1.212:3000/joe/demo-frontend.git .
fi
SHORT_SHA=${GITHUB_SHA::8}
cat > package.json <<EOF