Skip to content

Commit 16ac9f9

Browse files
fix: Create demo branch if it doesn't exist
1 parent a2f5597 commit 16ac9f9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/sync-demo.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ jobs:
1717
ref: main
1818
token: ${{ secrets.GITHUB_TOKEN }}
1919

20+
- name: Create demo branch if it doesn't exist
21+
run: |
22+
if ! git ls-remote --heads origin demo | grep -q demo; then
23+
echo "Creating demo branch..."
24+
git checkout -b demo
25+
git push origin demo
26+
else
27+
echo "Demo branch already exists"
28+
fi
29+
2030
- name: Checkout demo branch
2131
uses: actions/checkout@v4
2232
with:

0 commit comments

Comments
 (0)