feat: stash changes before checkout
ci/woodpecker/push/woodpecker Pipeline failed Details

This commit is contained in:
Aravinth Manivannan 2023-10-21 14:50:42 +05:30
parent b79e6fa2ba
commit a1d1e7413d
Signed by: realaravinth
GPG Key ID: F8F50389936984FF
1 changed files with 2 additions and 0 deletions

View File

@ -101,10 +101,12 @@ deploy() {
if [[ -z $(git ls-remote --heads origin ${1}) ]]
then
echo "[*] Creating deployment branch $1"
git stash
git checkout --orphan $1
else
echo "[*] Deployment branch $1 exists, pulling changes from remote"
git fetch origin $1
git stash
git switch $1
fi