ci: fix divergent branches (reset --hard)
Some checks failed
Build & Deploy / build (push) Failing after 6s
Some checks failed
Build & Deploy / build (push) Failing after 6s
This commit is contained in:
@@ -20,8 +20,12 @@ jobs:
|
|||||||
WORK=/root/.cache/demo-frontend
|
WORK=/root/.cache/demo-frontend
|
||||||
mkdir -p $WORK
|
mkdir -p $WORK
|
||||||
cd $WORK
|
cd $WORK
|
||||||
[ -d .git ] || git clone http://joe:${GITEA_TOKEN}@192.168.1.212:3000/joe/demo-frontend.git .
|
if [ -d .git ]; then
|
||||||
git pull
|
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}
|
SHORT_SHA=${GITHUB_SHA::8}
|
||||||
cat > package.json <<EOF
|
cat > package.json <<EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user