Skip to content

Commit

Permalink
delete staging before creating new branch in yaml file
Browse files Browse the repository at this point in the history
binni979 committed Jul 10, 2024
1 parent 8230c7a commit cdde7c2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/banner.yaml
Original file line number Diff line number Diff line change
@@ -129,17 +129,19 @@ jobs:
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: Checkout or Create Staging Branch
- name: Delete existing staging branch if it exists
run: |
git fetch
if git show-ref --verify --quiet refs/remotes/origin/staging; then
git checkout staging
git reset --hard origin/staging
else
git checkout -b staging
git push --set-upstream origin staging
git push origin --delete staging
fi
- name: Checkout or Create Staging Branch
run: |
git fetch
git checkout -b staging
git push --set-upstream origin staging
- name: Commit files
id: commit-changes
run: |

0 comments on commit cdde7c2

Please sign in to comment.