Update deployment workflow (main + master support + cleanup)
All checks were successful
Deploy to Dappbundle / Deploy (push) Successful in 43s
All checks were successful
Deploy to Dappbundle / Deploy (push) Successful in 43s
This commit is contained in:
parent
7baa467cf2
commit
404a4e82a9
13
.github/workflows/push-dappbundle.yml
vendored
13
.github/workflows/push-dappbundle.yml
vendored
@ -4,6 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -27,10 +28,8 @@ jobs:
|
|||||||
echo "== Ensuring dappbundle repo exists =="
|
echo "== Ensuring dappbundle repo exists =="
|
||||||
|
|
||||||
if [ ! -d "$BASE/dappbundle/.git" ]; then
|
if [ ! -d "$BASE/dappbundle/.git" ]; then
|
||||||
echo "Cloning dappbundle..."
|
|
||||||
git clone git@gitea.ranchimall.net:RanchiMall/dappbundle.git "$BASE/dappbundle"
|
git clone git@gitea.ranchimall.net:RanchiMall/dappbundle.git "$BASE/dappbundle"
|
||||||
else
|
else
|
||||||
echo "Updating dappbundle..."
|
|
||||||
cd "$BASE/dappbundle"
|
cd "$BASE/dappbundle"
|
||||||
git pull
|
git pull
|
||||||
fi
|
fi
|
||||||
@ -40,10 +39,16 @@ jobs:
|
|||||||
rm -rf "$BASE/dappbundle/$APP"
|
rm -rf "$BASE/dappbundle/$APP"
|
||||||
git clone git@gitea.ranchimall.net:RanchiMall/$APP.git "$BASE/dappbundle/$APP"
|
git clone git@gitea.ranchimall.net:RanchiMall/$APP.git "$BASE/dappbundle/$APP"
|
||||||
|
|
||||||
|
echo "== Cleaning git metadata =="
|
||||||
|
|
||||||
|
cd "$BASE/dappbundle/$APP"
|
||||||
|
rm -rf .git .github .gitignore .gitattributes
|
||||||
|
|
||||||
cd "$BASE/dappbundle"
|
cd "$BASE/dappbundle"
|
||||||
|
|
||||||
git config user.email "ranchimallfze@gmail.com"
|
git config user.email "ranchimallfze@gmail.com"
|
||||||
git config user.name "ranchimall"
|
git config user.name "ranchimall"
|
||||||
|
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Auto-update $APP" || echo "No changes to commit"
|
git commit -m "Auto-update $APP" || echo "No changes"
|
||||||
git push
|
git push
|
||||||
Loading…
Reference in New Issue
Block a user